📚 Practice Mode
Java Programming Fundamentals and Advanced Concepts
Learn at your own pace with hints and detailed explanations
1 / 18
Multiple Choice
class c1 { public void m1() { System.out.println("m1 method in C1 class"); } } class c2 { public c1 m1() { return new c1(){ public void m1() { System.out.println("m1 mehod in anonymous class"); }};} public static void main(String a[]) { c1 ob1 =new c2().m1(); ob1.m1(); }}
- prints m1 method in C1 class
- prints m1 method in anonumous class
- compile time error
- Runtime error
- none of the above