Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Programmer Certification (OCPJP)
Top level classes not protected
Sudhanshu Mishra
Ranch Hand
Posts: 238
1
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi all,
Why can a top level class be default but not protected?
Thanks...
Thanks,
Sudhanshu(OCPJP,OCEJPAD)
Ankit Garg
Sheriff
Posts: 9707
43
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What good would it bring? Practically you would either want a class to be either package visible or public so that it can be accessed in other packages. The private and protected specifiers are for only elements inside a class...
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
|
SCWCD Links
Abhinav Shukla
Greenhorn
Posts: 13
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You cannot inherit a top level class, so its meaningless to make it "protected"
PS : "inheriting a top class" is not same as "inherit
from
a top class".
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Default constructor
Roundup game
private class?
Top-Level class
More...