posted 20 years ago
Hello,
this is a question in the MasterExam II attached with the K&B book.
Which two create an anonymous inner class from within class Bang?
The reference told me that these are the correct answers:
c) Bing b = new Bing(){"Foo";};
d) Bing b = new Bang(){};
I think d) is OK, but c) should be :
Bing b = new Bing("Foo"){};
Do you agree?
Thanks!