L
lonelyplanet999
Hi,
I'm studying Java Sun certified programmer (310-035) stuff and met
below questions:
1. What is the most restrictive access modifier that will allow
members of one class to have access to members of another class in the
same package ?
A. public
B. abstract
C. protected
D. synchronized
E. default access
The book's answer is E. It just said that default access is the
"package oriented" access modifier and public and protected are less
restrictive. But from what I know, access restriction among default
access & protected or public access are no different within a package.
Am I correct ? If not, could anyone suggest a counter example because
I couldn't think of one up to now.
I'm studying Java Sun certified programmer (310-035) stuff and met
below questions:
1. What is the most restrictive access modifier that will allow
members of one class to have access to members of another class in the
same package ?
A. public
B. abstract
C. protected
D. synchronized
E. default access
The book's answer is E. It just said that default access is the
"package oriented" access modifier and public and protected are less
restrictive. But from what I know, access restriction among default
access & protected or public access are no different within a package.
Am I correct ? If not, could anyone suggest a counter example because
I couldn't think of one up to now.