Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
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:
Beginning Java
protected and package/default access
FELIX ALE
Greenhorn
Posts: 2
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is the major difference between protected and package/default access specifiers, someone should help me please.
Ben Wood
Ranch Hand
Posts: 342
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
protected is less restrictive than the default and allows visibility to subclasses outside the package of the superclass. Default only allows access to subclasses within the same package as the superclass.
SCJP 1.4, www.gsi3d.org.uk
Niki Nono
Ranch Hand
Posts: 256
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Protected works between packages and default works only in the same package.
this is the simplest explanation I can think of.
Life called,so here I am.<br />Cheers<br />Niki.:-)
Jan Groth
Ranch Hand
Posts: 456
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When I studied
Java
for the exam, I used a book which called the default accessor "package private". this name really tells a lot... ;-)
greets,
jan.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
protected member
access level
Explicit default constructor
default scope
protected access of a class
More...