Initial Java Features
Simple, object-oriented, cross-platform, secure, multi-threaded.
PS: "Simple", which I think is relative to the lower level of the language, "cross-platform" should be the Java language most proud of the label; "Object-oriented" is a deep understanding of Java programming methods and ideas.
Environment
The environment here refers to the programming environment, the compilation and interpretation environment, and the operating environment. PS: Interpretation may not be appropriate, subsequent modification.
- Jdk:java Development Kit is the development Kit tool;
- Jre:java runtime Environment is the runtime environment;
- Jvm:java virtural Machine is the Java VM;
- Java SE API: such as IO, GUI, network, etc.;
Environment variable Configuration
- Java_home Configuring the directory for the JDK;
- CLASSPATH specifies the runtime's class code, such as Tools.jar, Dt.jar;
- path Specifies the location of the executable program, and Java_home and classpath need to be added to it.
Understanding Java Program Basic file Unit-class
- The file name must be the same as the public-decorated class name, with. Java as the file suffix, and if the defined class is not public, the file name can be different from the class name;
- A. java file can have multiple classes, but only one class that is public-modified;
- After the Java source code file is compiled, a class corresponds to a. class file;
- A Java application should contain a main method, which is an application's entry method that can be defined in any class, not necessarily the public-decorated class.
Compilation Interpretation execution
- Programmers write Java source code (. java files);
- java compiler, compiled by the javac command. Java source code;
- The Java bytecode file generated by the Javac command, the. class file is independent of the operating system platform, which is the cross-platform feature;
- The Java interpreter, through Java commands, invokes the. Class bytecode file, which is then interpreted by the JVM as a machine language that the computer can understand to execute Java code.
PS: I think the JVM is the key to the Java language cross-platform.
Chapter II Initial Java