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. ...
Get The class of Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.