What is the Java language

Simply put, Java is an object-oriented programming language launched in 1995 by Sun Microsystems. In 2010, Oracle Corporation acquired Sun Microsystems, after which Oracle Corporation was responsible for Java maintenance and version upgrades.

In fact, Java is still a platform. The Java platform consists of a Java Virtual Machine (Java Virtual Machine, JVM) and a Java Application Programming Interface (Application Programming Interface, API). The Java application programming interface provides a standard interface independent of the operating system, which can be divided into basic parts and extended parts. After installing a Java platform on a hardware or operating system platform, Java applications can run.

The Java platform is embedded in almost all operating systems. In this way, a Java program can be compiled only once and run on various systems. The Java API has evolved from version 1.1x to version 1.2. The commonly used Java platform is based on Java 1.6, and the latest version is Java 1.8.

Since the development of Java, it has tried to make it omnipotent. In the world programming language rankings, Java has consistently ranked first in recent years, a few percentage points higher than the second-ranked C language.

World Programming Language Ranking

According to the scope of application, Java can be divided into three systems, namely Java SE, Java EE and Java ME. The three systems are briefly introduced below.

  1. Java SE
    Java SE (Java Platform Standard Edition, Java Platform Standard Edition), formerly known as J2SE, allows the development and deployment of Java applications for use in desktops, servers, embedded environments, and real-time environments. Java SE includes classes that support the development of Java Web services and provides the foundation for Java EE, such as the Java language foundation, JDBC operations, I/O operations, network communication, and multithreading technologies. Figure 1 shows the architecture of Java SE.

Architecture of Java SE
Figure 1 Architecture of Java SE (click here to view the original image)
2. Java EE
Java EE (Java Platform Enterprise Edition, Java Platform Enterprise Edition) was formerly known as J2EE. The Enterprise Edition helps develop and deploy portable, robust, scalable, and secure server-side Java applications. Java EE builds on Java SE and provides Web services, component models, management and communication APIs that can be used to implement enterprise-class Service Oriented Architecture (Service Oriented Architecture, SOA) and Web 2.0 applications.
3. Java ME
Java ME (Java Platform Micro Edition, Java Platform Micro Edition) was formerly known as J2ME, also known as K-JAVA. Java ME provides a robust and flexible environment for applications running on mobile and embedded devices such as cell phones, PDAs, TV set-top boxes, and printers.

Java ME includes a flexible user interface, a robust security model, a rich set of built-in networking protocols, and support for dynamically downloaded networked and offline applications. Applications based on the Java ME specification can be written once for many devices and can take advantage of each device's native capabilities.
The characteristics of the Java language The
style of the Java language is very similar to the C language and the C++ language. It is a pure object-oriented language. It inherits the object-oriented technology core of the C++ language, but discards some of the shortcomings of C++, such as error-prone pointers and multiple inheritance.

The Java language is a distributed object-oriented language, which has many characteristics such as object-oriented, platform-independent, simplicity, interpretation and execution, multi-threading, security, etc. The following will introduce these characteristics one by one.

  1. Object-oriented
    Java is an object-oriented language, which has good support for classes, objects, inheritance, encapsulation, polymorphism, interfaces, packages, etc. in objects. For simplicity, Java only supports single inheritance between classes, but multiple inheritance can be achieved using interfaces. Using the Java language to develop programs requires the use of object-oriented thinking to design programs and write codes.
  2. Platform independence
    The specific manifestation of platform independence is that Java is a "write once, run anywhere (Write Once, Run any Where)" language, so programs written in Java language have good portability, and it is Java's virtual machine mechanism that guarantees this. After the introduction of the virtual machine, the Java language does not need to be recompiled to run on different platforms.

The Java language uses the Java virtual machine mechanism to shield the relevant information of the specific platform, so that the program compiled by the Java language only needs to generate the object code on the virtual machine, and can run on various platforms without modification.
3. Simplicity
The syntax of Java language is very similar to C language and C++ language, which makes it easy for many programmers to learn. For Java, it discards many incomprehensible features in C++, such as operator overloading and multiple inheritance, and the Java language does not use pointers, and adds a garbage collection mechanism, which solves the problem of programmers needing to manage memory and makes programming easier.
4. Interpretation and execution
Java programs will be compiled into bytecode files when running on the Java platform, and then can be run on an operating system with a Java environment. When running the file, the Java interpreter interprets and executes these bytecodes, and the classes that need to be added during the execution process are loaded into the running environment during the connection phase.
5. Multithreading
The Java language is multithreading, which is also a major feature of the Java language. It must be created by the Thread class and its subclasses. Java supports simultaneous execution of multiple threads and provides a synchronization mechanism between multiple threads. Any thread has its own run() method, and the method to be executed is written in the body of the run() method.
6. The distributed
Java language supports the development of Internet applications. There is a network application programming interface in the basic Java application programming interface, which provides a class library for network application programming, including URL, URLConnection, Socket and so on. Java's RIM mechanism is also an important means of developing distributed applications.
7. Robustness
Java's strong type mechanism, exception handling, garbage collection mechanism, etc. are all important guarantees for Java's robustness. The discarding of pointers is a big step forward for Java. In addition, Java's exception mechanism is also a great embodiment of robustness.
8. High performance
Java's high performance is mainly relative to other high-level scripting languages. With the development of JIT (Just in Time), Java's running speed is getting higher and higher.
9. Security
Java is usually used in a network environment, for this reason, Java provides a security mechanism to prevent malicious code attacks. In addition to many security features of the Java language, Java also adds a security mechanism to classes downloaded through the network, allocates different namespaces to prevent local classes of the same name from being replaced, and includes a security management mechanism.

Guess you like

Origin blog.csdn.net/D0126_/article/details/131430102