The 1 method is an abstraction of a class or object's behavioral characteristics, which is the most important part of a class or object
2 Java inside methods have only one parameter pass: value passing
Value passing: A copy of the actual parameter value is passed in to the method, and the parameter itself is unaffected. (This is how the Java basic type parameter is passed)
3 How values are passed in the same way that reference type parameters are passed in Java
4 If you define a method, add three points after the type of the last formal parameter ..., it indicates that the parameter can accept more than one argument value, and that more than one parameter value is passed in as an array
5 number variable parameters can pass in more than one parameter, or you can pass in an array
61 methods The body calls himself, called a recursive method
7 member Variable: refers to a variable defined in a class
8 Local variables: Refers to variables defined within a method
9 A local variable must be initialized in addition to the formal parameter, that is, you must first specify the initial value for the method local variable or code block local variable, otherwise you cannot access it.
10 if the local variable and the member variable have the same name in the method, the local variable overrides the member variable
One-to-one Java access control characters
- Private can only be accessed within the current class
- Default (Package access permission) can be accessed by other classes under the same package
- Protected (Subclass access rights) can be accessed by other classes within the same package, or by subclasses within different packages
- Public access rights
Package: Provides a class of multi-level namespaces for resolving class naming conflicts, class file management, and so on
The way Java places a class under a specified package structure: packages PackageName
13 classes in a package must also have the same directory structure as the package name hierarchy in the file system
14 If the-D option is not available when compiling Java source files, the compiler does not generate the appropriate file structure for the Java source files
15 generally it is recommended to separate Java source and class files for management / nbsp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp &NBSP , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp &NBSp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp &NBsp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp   , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp
7 Java Notes