posted 20 years ago
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?