Day1

1. Simplicity:

The syntax of the Java language is very close to that of the C and C++ languages, making it easier for most people to learn and use Java. On the other hand, Java discards some of the hard-to-understand and less-used features of the C language. In particular, the Java language Abolished the pointer, increased the concept of reference type, used to replace the pointer

2. Distributed:

Multiple servers work together to process the same service

3. The focus of the six characteristics of Java:

    Cross-platform:

        Java can run on different platforms (write a code to use different platforms), but it cannot run directly. It requires a compilation process. Java is compiled into a .class file (bytecode file); it really runs on the platform The .class file is the .class file, but the .class file runs on the Java virtual machine. The .class file of the Java virtual machine is finally translated into instructions that the operating system can handle. Finally, as long as the operating system has installed the Java virtual machine, the Java program can be run.

4. Security: (memory recycling mechanism)

GC garbage collection mechanism polling mechanism (release the space that is not used by anyone)

Garbage space - unused space unreferenced memory space delayed release (lag)

The reference counting mechanism is used in OC (all used to release unused space)

5. Robustness: (higher fault tolerance)

Report website exceptions and need to handle them yourself

6. Object Oriented:

For the sake of simplicity, only single inheritance between classes is supported, but multiple inheritance between interfaces is supported, and the implementation mechanism between classes and interfaces is supported


Java development environment

1. JDK Development Kit

2. JRE running jar package (class provided by the system)

        In fact, the jar package is a .class file

3. JVM Java virtual machine (finally translated into instructions recognized by the operating system)

The relationship between the three:

JDK contains JRE and JVM

JRE contains JVM


Console compile Java code instructions

1.javac compiles .java into .class files

javac filename.java

2.java executes the java program

java filename

3. JavaDoc makes API documentation


JDK

The bin folder saves the operation instructions of java

The lib folder holds the jar package provided by the system


under Windows

Note: When compiling the code directly using the java command, it will appear that the instruction cannot be found. You need to configure environment variables (so that the system can find the instructions in the bin folder)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325227778&siteId=291194637