O'Reilly logo

The class of Java by Pravin Jain

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

CHAPTER 12

Nested and enum Types

So far we have seen that in Java we have got classes and interfaces, which are organized into packages. These classes and interfaces which are members of a package can have only two access specifiers, either they are public or default. In classes we have seen only variables, methods, constructors and intializer blocks as members. The variables, methods and initializer blocks may be static or non-static. The members of class may have any of the four access specifiers, except for the blocks which may not have any access specifier since these are not directly invoked, but get invoked when a constructor is invoked (non-static block) or when the class is loaded (static block). The methods and constructors may be overloaded. ...

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