This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interface

 
pree sree
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is a ? from http://www.angelfire.com/or/abhilash/Main.html
6)An Interface can never be private or protected.
Answers
True
False
the answer given is false.Is this true?i could not compile them.
 
Ashish Hareet
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this,

HTH
Ashish H.
[ September 03, 2002: Message edited by: Ashish Hareet ]
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pree:
I think Interface can only have public or no access specifier just like class...I do not understand how your resource is saying otherwise...
Thanks
Barkat
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless, interface is an inner interface which can have all public, protected or private access specifers just like inner classes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic