JavaSE study notes -- 01, javase Study Notes
Basic knowledge:
1. Human-Computer Interaction:
GUI)
Command Line (CLI)
2. Common doscommands:
Dir: list all files and folders in the current directory;
Md: create a directory;
Rd: delete a directory;
Cd: Enter the specified directory;
Cd...: Return to the upper-level directory;
Cd/: Return to the root directory;
Del: delete an object;
Exit: exit the doscommand line;
Iii. Java features:
1. cross-platform: Use JVM to implement cross-platform performance;
2. Object-oriented:
1. Two basic concepts: class and object;
2. Three features: encapsulation, inheritance, and Polymorphism;
3. Open Source;
4. robustness. It absorbs the advantages of C/C ++, but removes the part that affects program robustness and provides a relatively secure
Memory Management and access mechanism;
4. Java System Platform:
1. SE: Standard Edition (desktop applications );
2. EE: Enterprise Edition (enterprise applications );
3. ME: small version (mobile terminal );
4. Java Card: Small memory device;
V. Two core mechanisms of Java:
1. Java Virtual Machine;
2. Garbage collection mechanism;
6. File compilation specifications: All java files must end with ". java;
7. The first Java program HelloWorld
1 class HelloWorld {// class Declaration 2 public static void main (String [] args) {// main method, program entry; 3 System. out. println ("Hello World! "); // Output Statement 4} 5}
8. Notes:
Single line comment ://;
Multi-line comment :/*
*/
IX. Notes:
1. The source file must end with. java;
2. The source file can contain classes declared by multiple classes;
3. The main method (main) can be used in the class: The format is fixed public static void main (String [] args ){}
4. The main method is the entry of the program, and the method is the execution part of the program;
5. Only one public class can be declared in a source file, and the class name must be consistent with the file name;
6. Each statement ends;
7. Multi-line comments cannot be nested;