• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

access specifier

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can classes have access specifier other than 'public' and 'no specifier - friendly' specifiers
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep and No...
A top level class/interface has to be public.
if u try to compile a top level class with access modifier as default or say protected it gives error..
But if a class is not top level class then it can be protected/default....
Hope I am right.
But abt top level thing I am sure that it has to be public..Cannot be any other thing..

Originally posted by Sagar Sharma:
can classes have access specifier other than 'public' and 'no specifier - friendly' specifiers


 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Top level class could be abstract,final,public
or none(i.e. package or default specifier)
regds
Nm
------------------
"Knowledge is Power"****************MY SCJP RESOURCES
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
just to add ---
non top level class can be private also.

regards
deekasha

[This message has been edited by deekasha gunwant (edited January 15, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic