Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

interface  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!