this package import

this

1.this refers to the current object itself.

2. put this seat parameter legend



package

1. Organize classes or interfaces with similar or related functions in the same package to facilitate the search and use of classes.

2. Like folders, packages also use a tree-like directory storage method. The names of classes in the same package are different, and the names of classes in different packages can be the same. When calling classes with the same class name in two different packages at the same time, the package name should be added to distinguish them. Therefore, packages can avoid name collisions.

3. Packages also limit access rights. Only classes with package access rights can access classes in a package.



import

1, load the defined class or package


2. Import support classes (which can be JDK basic classes or classes written by yourself), which can be used by this class to call methods and properties


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325896260&siteId=291194637