wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "inner interface?" Watch "inner interface?" New topic
Author

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?
Thanks.
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: inner interface?
 
Similar Threads
question from abhilash's quiz
Interface
interface
Interface doubt
Interfaces