1.

class Boo { Boo(String s) { } Boo() { }
}
class Bar extends Boo { Bar() { } Bar(String s) {super(s);} void zoo() { // insert code here }
}
which one create an anonymous inner class from within class Bar?

A. Boo f = new Boo(24) { };
B. Boo f = new Bar() { };
C. Bar f = new Boo(String s) { };
D. Boo f = new Boo.Bar(String s) { };
Answer» C. Bar f = new Boo(String s) { };


Discussion

No Comment Found

Related MCQs