1.main is a special name used to describe a program's development method, but it is not a keyword.
2. Writing a class in Java is the creation of a new data type.
3. If we hardcode a numeric value in the code, this value becomes literal . Hard coding refers to the method of replacing a mutable variable with a fixed value.
4.\0 represents a null character.
5. A string is a sequence of characters .
6. The string is not a basic type and is represented by a class . The string class to represent the strings object.
7. For string literals in Java code, the JVM automatically creates a string object for us.
8. Each base type that is to be concatenated with a string object is automatically converted to a new string object.
Each object in 9.Java has the ToString () method, and any object can be converted to a string object.
The string represented by the 10.String object cannot be changed .
11. Variable types other than basic types are referred to as reference types .
12. When we declare a variable of a class type, the variable becomes a reference .
13. A reference to point to an object, or null.
14. The difference between a reference type and a base type: The reference does not contain the actual data of the object it points to, but instead points to the location of the object in memory .
15. The compiler does not allow us to convert a reference to any numeric value.
The inside of a 16.Java virtual machine consists of a class loader , a runtime data area , and an execution engine . The class loader loads the Java classes to be executed, and the execution engine is responsible for executing the instructions in the method of the loaded class, and what needs to be stored in memory (such as bytecode, objects, variables) are organized in the run-time data area.
17. A running Java program exists in the form of a process, and the JVM allocates memory space for the process.
18. A process can have one or more threads, and multiple threads share the process's memory space. Each thread is a separate execution unit .
19. Each Java virtual machine has a method area and a Java heap , which are shared by all threads in the JVM. The bytecode and Chang (constants and literals) of the class file are placed in the method area, and all objects created when the program is run are placed in the heap .
20. For basic types of variables, the Java Virtual machine is placed in the Java stack . For a variable of a reference type , the reference variable itself is placed in the stack , and the object pointed to by the reference is placed in the heap .
21. The keyword Goto and const are reserved keywords and are not implemented in Java. True, FALSE, and Null are special literal values that, technically speaking, are not Java keywords.
22. Integer literals are treated as int by the JVM, and floating-point literals are treated as double by the JVM, and string literals are treated as java.lang.String objects.
23. Once the string object is instantiated, its contents cannot be modified.
2nd Java Basic Syntax