O'Reilly logo

Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) by Marcus Green, Bill Brogden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Class Members

Access to class members of all types is controlled by access modifier keywords and the no-keyword default as follows:

  • public— A public member is accessible from any class in the program.

  • protected— A protected member can be accessed only by classes in the same package and classes derived from the current class—no matter which package they are in.

  • private— A private member can be accessed only from within the class.

  • default— If none of the other access modifier keywords appear, the default applies (access only by classes in the same package). You may see the word “friendly” used in connection with the default access, but “friendly” is not a Java keyword.

Other keywords that can be applied to class members are static, final, abstract ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required