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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access