this keyword
The structure can be called: properties, methods, constructors
this call properties, methods: put this understanding into the current object or objects currently being created
this call the constructor:
- In the constructor for class, it can be used in display
this(形参列表)
mode, call other constructor class specified in the present - The constructor can not
this(形参列表)
invoke its own this(形参列表)
It must be declared at the beginning of the line current constructor- Internal constructor, a statement can only
this(形参列表)
be used to call other constructors
The package keyword
Instructions for use:
- In order to better manage the class project to provide a package concept
- Package, use the package statement declaring class or interface belongs to the first line in the source file
- Packet identifier belongs to, follow the naming rules for identifiers
- Each
.
one represents a layer of the file directory
import keyword
Instructions for use:
- The import configuration file displayed in the source package introduced under the specified classes, interfaces,
- Disclaimer declared between classes and packages
- If you need to import to a structure, it can be tied to write
- Use
xxx.*
mode, it represents importxxx
all structures of the package - If the class or interface is used
java.lang
under the package defined, you can skipimport
structure - If the class or interface is defined under this package, you can skip the
import
structure - If the source file, the name of the class used in different package, at least one class must be displayed in a manner of full class name
- Use
xxx.*
way shows that you can callxxx
all the structures under the package. But if the structure in which sub-packets of the packet, the display is still a need to import import static
: Introducing the specified class or static structure (properties or methods) interface