• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

interfaces

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic