Usage in JAVA package, and this constructor
Usage in JAVA package, and this constructor
Encapsulation is surrounded by the process and data, access to the data only via the defined interfaces. Object-oriented computing began in the basic notion that the real world can be represented as a series of fully autonomous, encapsulated objects that access other objects through a protected interface. Packaging is an information hiding technology keyword package private, protected, public in java. What is the package? The packaged together all the components of the object, how to define the program package referenced data objects, the method actually used to package the class of data hiding, modification and control the degree of access to data on the user class. Appropriate package can make the code easier to understand and maintain, and enhance the security code.
This
this keyword has three main applications:
(1) The class attributes this call, i.e. the class member variables;
other methods of class (2) this call;
(. 3) this call other configurations in this class method, the first line should be placed constructor when calling.