1. Java What are the characteristics of language?
Simplicity, object-oriented language, a platform-independent language, robustness and security, multi-threading, garbage collection mechanism;
2. how to compile and execute Java file? What are the commands for generating help documents?
Compiling: Javac file name
Execution: Java class name
Generate Help Document: Javadoc file name
3. What is the workflow of a virtual machine?
Write the source file *.java---Compile the source file into a bytecode file by Javac *.class
Class loading------Bytecode validation-------interpreter------Operating system
4. JDK and JRE What is it? How does the main method write?
The JDK is the Java Development toolset, which contains the compilation environment, the running environment, the debugging environment, the base class library; The JRE is the Java Runtime Environment, including virtual machines, core class libraries, and linked files
The JDK contains the JRE;
public static void Main (string[] args) {}
5. What is an identifier? How many identifiers are there? What are the naming rules for identifiers?
Any place that can be named is called an identifier.
The name we choose is called an identifier, there are two types of identifiers, the user identifier, and the system identifier is also called a keyword. has a special meaning, so the user identifier cannot have the same name as the system identifier;
Naming rules:
Identifiers cannot be keywords or true,false,null;
Identifiers can contain letters, numbers, underscores, dollar signs
The first letter of the identifier must be a letter or an underscore, a dollar sign, and not a number;
Identifiers are case-sensitive and do not specify a maximum length;
Naming conventions:
Ask for a name to know;
Class name, starting with an uppercase letter, named after the hump.
Method name and variable, lowercase letter start, also use hump name;
Constants, all made up of uppercase letters;
Java Basic Knowledge points