What are the characteristics of Java?
1. Simplicity
2. Object-Oriented languages
3. A platform-agnostic language (cross-platform)
4. Robustness and security
5. Multithreading
6. Garbage collection mechanism
2. What is a JDK? What is a JRE?
The JDK is the Java Development toolset. (compilation environment, running environment, debugging environment, base Class library)
The JRE is the operating environment of Java. (Virtual machine, core class library and connection file; JDK includes JRE)
3. What is the directory structure of the JDK?
Bin: Holds the executable command file. Javac.exe is the compiled executable file;
Java.exe is an executable file that executes Java.
DB: Database Support directory.
The sample code for the Demo:applet.
Include: the header file that holds the JDK support.
JRE: The running environment.
LIB:JDK's base Class library. (Debug environment)
Sample code for the Examples:java program.
The source code of the Src.zip:java.
5, what variables, the three elements of the variable, what should be noted before the use of variables?
A variable is a named memory space. The content of the space can change, and the new data can be used to replace the old data to achieve the results of memory reuse.
Variable
4. Three elements: data type. variable name. Variable Value
Variables must be initialized before they are used, and in Java it is not possible to initialize variables.
5, how to configure environment variables? Why Configure environment variables?
How to configure: Add the Jdk/bin directory under the path key of the environment variable
Why configure environment variables: Javac.exe is required at compile time; Java.exe is required for execution. and two files in Jdk/bin. In order to use the JDK's compilation and runtime environment in any directory, you need to set up the environment directory.
6. How to compile Java files? How do I execute a Java program?
Compile Java file: javac+ space + file name (file suffix. java)
Execute Java File: java+ Space + class name (main class, with Main ())
7. What are the requirements for file names and class names that must be consistent?
If a class is declared public, the file name and class name require consistency.
5.JAVA Basics Review