Usage in JAVA package, and this constructor

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.

Here Insert Picture Description
Here Insert Picture Description

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.

Released five original articles · won praise 0 · Views 71

Guess you like

Origin blog.csdn.net/z87447/article/details/104988831