Four features of the Java language

Simplicity: No Pointers; Does not have C++ multiple inheritance features; Portability: Java source code can run on different operating systems (due to differences in the JVM, OS differences are screened) robustness: The Java language introduces automatic garbage collection (GC) mechanism, Java programs start a garbage collection thread, constantly monitoring memory usage. Multithreading: Java programs support concurrent execution of multiple threads. Object-oriented: Java programs also have object-oriented mechanisms such as encapsulation, inheritance, and polymorphismCopy the code

JDK, JRE, and JVM

The three are inclusive relations

JDK: Java Development Kit

JRE: Java Running Enviroment

JVM: Java Virtul Machine

Java load and execution

Javac. exe checks the syntax and generates bytecode files from a.java to a.class. Biggest lass. Arthur c. lass, and so on. The Java VIRTUAL machine will start the class loader. The class loader is responsible for finding the bytecode file from disk according to the bytecode file name and loading it to the Java VIRTUAL machine. The JVM is responsible for interpreting the bytecode file and converting it into binary code. The operating system then interacts with the hardware platform by executing binary instructions.

It is better not to use integrated development environment IDE at the beginning of learning Java programming, which is not conducive to the mastery of code. It is recommended to use a text editor, or even notepad. In this case, we need to be familiar with some DOS commands

Common DOS commands

Open the DOS command window: Use the shortcut key win + r, enter CMD, and press Enter.

Dir command: view all subfiles or subdirectories in the current directory.

Note that paths include relative paths and absolute paths. For Windows, a path starting from the root path of a hard disk is an absolute path. For example: C:\Program Files, C:\Program Files\Java, etc. All relative paths are searched from the current directory as the starting point. Plus: CD… Switch to the parent directory, CD \ switch to the root directory.

Switch drive letter: directly enter C:, or D:, and then press Enter. The CD command is not required to switch drive letters.

Del command: deletes a file or directory, for example, del *. Class, and deletes all. Class files in the current directory.

Run the ipconfig command to view the IP address and other information. Run the ipconfig /all command to view more detailed information.

Ping command: Check whether the two computers can communicate with each other. For example: Ping 192.168.1.100: The communication is normal if the number of packets sent and received is the same and there is no delay. Ping 192.168.1.100 -t: the communication is normal. Ping www.baidu.com to check whether the computer is connected to the Internet.

Run the mkdir command to create a directory. For example, mkdir ABC indicates that an ABC directory is created under current Directory.

CLS command: Clear the screen.

Exit command: Exits the DOS command window.

Links: More common DOS commands. From Baidu to write the first Java program: A Xin miss a Jie very much.

Public class imissajie {public static void main(String[] args) {system.out.println (" args "); }} 1 2 3 4 5Copy the code

Public static void main(String[] args) {// void main(String[] args) {// void main(String[] args)}

Here is the basic syntax for markdown editing: {emphasize text emphasize text

Bold text Bold text

Tag text

Delete the text

The reference textCopy the code

H2O is a liquid.

The result of 210 is 1024

#pic_center image size control =30×30}