Hi!
I think there are two errors in Code-6.12 (DummyClass) of the exercise
6.1 (Access modifiers within the same package).
In de code says:
"   // Protected field. Can be accessed only within
    // the same package."
and
"   // Default is protected"

I was reading "The Java Tutorial", Controlling Access to Members of a
Class section 
(http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html)
and I understood that "protected fields" can be accessed from the same
class, from the classes of the same package and from its subclasses
(in the same or different package); and fields without access
modifiers can be accessed only from the classes of the same package.
Is this correct?

Thank you.

-- 
[Adrián E. Córdoba]
-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to