wood burning stoves
The moose likes Mock Exam Errata and the fly likes inner interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "inner interface?" Watch "inner interface?" New topic

inner interface?

jordan gong
Ranch Hand

Joined: Jun 12, 2001
Posts: 37
A top-level interface cannot be private or protected.
Can an inner interface be private or protected?
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Jordan,
An interface declared within a class can be 'private' or 'protected'. You cannot declare an 'inner interface' in an interface declaration.

Remember that all interface members are implicitly 'public', making it impossible to declare an interface inside an interface as 'private or protected'
Hope that helps.
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
I agree. Here's the link: http://aspose.com/file-tools
subject: inner interface?
It's not a secret anymore!