Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic