i m not too clear wht u r asking in ur example..
but genrally in "private" access level, the same
object have access to all the methods & variables
eventhough it's private. but outside the class the
other class can't access a private member.
"protected" access level, the child (extending) class
has access to all the protected members if it's in a
SAME PACKAGE. but if the extending child class is in
different package they can't access parent's protected
member but still they can use their own version of
protected members (child.xxx())
"public" access level will allow full access to the
same class, a class in same package, a class in
different package. (means no restriction)
for more information plz check the following link:-
java.sun.com/.../accesscontrol.html