Default value of a property in a class
1. The default value for the initialization of the number type (int,short,byte,long,float,double) is 0
The default value for 2.boolean initialization is false
3. The default value for the initialization of a reference type is null. such as String type
The default value for a property in a method in a class is not
This is an important difference between the two. Therefore, the properties in the method must be assigned when used.
The search order of the class (descending by Priority):
1 Current compilation unit (that is, within the same class)
2 single-type import (single-type is specified, deterministic, e.g. import Com.sh.dj.Dog)
3 other classes in the same package
4 on-Demand import (import com.sh.dj.*)
Classes that do not require explicit import, such as classes in the Java.lang package,
String is one of the classes
System also does not need to import explicitly
The following are some of the packages in the JDK
Java.lang Core Class
Java.util Tool class, collective frame
java.io input and output streams
Java.nio new input and output streams
java.sql JDBC Related classes
java.net Network Programming class
Java.time Time Processing class
Java.swing UI Class
Method
Method Concepts
Closed business logic
Improve code Reuse
Declarative syntax for methods
The return value of the method
return value, return the value with return, type of the value type
No return value, the return type is void
Invocation of an argument-free method
Java's OOP