aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Error in MasterExam? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Error in MasterExam?" Watch "Error in MasterExam?" New topic
Author

Error in MasterExam?

M. Herder
Greenhorn

Joined: Feb 24, 2003
Posts: 5
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!
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Hi Herder
I do agree. Just "Foo"; is not a legal statement.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in MasterExam?
 
Similar Threads
anonymous inner class question
Question Error?
Anonymous Inner class from K&B mock exam
Anno. Class Question
anonymous inner class