We have mentioned the term public members in relation to an object. We have also used the keyword static while talking about the main() method. We also stated that a member that is declared static can have only one copy in JVM memory. Now, we are going to define all that, and more.
Class (static) and object (instance) members
Private and public
The keywords private and public are called access modifiers. There are also default and protected access modifiers, but we will talk about them in Chapter 7, Packages and Accessibility (Visibility). They are called access modifiers because they regulate accessibility to (sometimes also called visibility of) classes, methods, and fields, from outside the class, and also because they...