Java Reference
In-Depth Information
Hiding the fields in a class by making them private is referred to as
encapsulation.
■■
A static field or method is not associated with each instance of the class.
Instead, there is only a single instance of the field or method, and it is
shared among all instances of the class and also the other classes in
your program.
■■
A static initializer is executed when a class is loaded. An instance ini-
tializer is executed right when a class is instantiated and is invoked
right before the constructor is invoked.
■■
Search WWH ::




Custom Search