wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "interfaces" Watch "interfaces" New topic
Author

interfaces

Kuma Akel
Greenhorn

Joined: Jul 23, 2004
Posts: 6
Hi,

The following is a question from Dan Chisholm's Mock exams..

Which of the following statements is not true?

a. An interface that is declared within the body of a class or interface is known as a nested interface.
b. A constant can be a member of an interface.
c. A class declaration can be a member of an interface.
d. If an interface is named in the implements clause of a class, then the class must implement all of the methods declared within the interface.
e. None of the above.

The answer is (d)

Though answer d is correct, I do not understand the (a) and (c). After I did this question, I went and reread the K&B on this topic, no where it mentions anything about it. So far I have been thinking, only the constants either objects or primitives and abstract methods are allowed to declare in interfaces. Can somebody explain me those two statements?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: interfaces
 
Similar Threads
Need your help!
About Interfaces
interface within a class
interface
Ambiguity on "None of the above"