This is the first day of my participation in Gwen Challenge

Many friends are using Java this development language, today to share with you some of the characteristics of this language.

Java Language features

First let’s take a look at the Java language features, as shown in figure 1.

Java is a pure object-oriented language with platform-independent features thanks to uniform bytecode files and differentiated JDK.

Java built-in rich class library, so that developers greatly improve efficiency. It supports the Web and is widely used in the background of websites of major Internet enterprises, such as Ali Meituan.

Java also has outstanding security, guaranteed by the sandbox security model, which effectively prevents code attacks.

Java is also very robust. For example, it is strongly typed, supports automated garbage collectors, and has comprehensive exception handling and security checking mechanisms.

Compared with the c + +

As object-oriented programming languages, Java and C++ have similarities and differences.

More point C++ Java
Language type Compiled language Explains compiling mixed languages
Execution speed fast slow
Cross-platform no is
object-oriented A mixture of object-oriented and procedural Pure object orientation
Pointer to the There are There is no
Multiple inheritance support Does not support
Memory management manual automatic

From the perspective of language type, C++ code compiled, can be directly executed by the computer, it is a compiled language, and Java through javac Java file compiled into a class file, but also requires the JVM to read a line from the class file to explain the execution of a line, it is interpreted and compiled hybrid language. With the addition of the JVM in the middle, Java also has the advantage of cross-platform features that C++ does not have.

From the perspective of object-oriented, C++ is a new exploration and extension on the basis of C, so it is a mixture of object-oriented and process-oriented, while Java is purely object-oriented.

In addition, C++ has the concept of Pointers, which Java does not. C++ supports multiple inheritance, Java does not. C++ requires manual memory management, while Java implements automatic memory management through garbage collection.