Java Programming Fundamentals and Advanced Concepts

Time: 00:00:00
0
Attempted
18
Not Attempted
0
Marked For Review
0
Attempted & Reviewed

Question 1 of 18

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(); }}

Select Your Answer:

All Questions

Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current