Introduction to Java programming tutorial--Java language overview

Table of contents

1.1 The birth and development of the Java language

1.2 Features of the Java language

1.3 Operating mechanism and virtual machine


1.1 The birth and development of the Java language

       The birth of the Java language can be traced back to 1991. It was called the OAK language at that time. It was a general environment designed by SUN for some consumer electronics products. Its original purpose was to develop a platform-independent software technology.
       In 1994, OAK technology began to be applied to the WEB, and the first version of HotJava was developed.
       In 1995, SUN officially launched Java, which quickly triggered a global upsurge in Java development and application.

        In January 1996, Sun officially released the Java Development Kit (Java Development Kit) JDK 1.0, which includes two parts: the operating environment and development tools.

        In December 1998, Sun Corporation grandly released JDK 1.2, marking the birth of the Java2 platform. After Java version 1.2, JDK 1.2 was renamed J2SDK, Java was renamed Java 2, and the highly sought-after Swing component library was launched. 
        In 1999, Sun launched the three platforms of J2EE, J2SE and J2ME with Java2 as the core. With the rapid advancement of the three major platforms, a huge wave of Java applications has formed around the world.

        In May 2000, Sun launched J2SE1.3, which enriched existing APIs and strengthened the expansion of new APIs; in February 2002,
        Sun released J2SE1.4, which is the first J2SE version of J2SE that participated in the Java Community Process (JCP). Borland, Compaq, Symbian, IBM and other companies participated in the customization of community specifications; in
        October 2004, Sun Corporation grandly released J2SE5.0.
        In April 2009, the well-known Oracle Corporation (consortium) acquired SUN, and released an integration plan for Sun's various businesses the following year, ushering in a new leap in the development of the Java platform.

 


1.2 Features of the Java language

( 1 ) The Java language is simple

       The syntax of the Java language is very close to that of C and C++ , making it easy for most programmers to learn and use Java . On the other hand, Java discards those features that are rarely used, difficult to understand, and confusing in C++ , such as operator overloading, multiple inheritance, and automatic casts. In particular, the Java language does not use pointers and provides automatic garbage collection so that programmers do not have to worry about memory management.

( 2 ) The Java language is object-oriented

       The Java language provides primitives such as classes, interfaces, and inheritance. For 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 (the keyword is implements ) . The Java language fully supports dynamic binding, while the C++ language only uses dynamic binding for virtual functions. In short, the Java language is a pure object-oriented programming language.

(3 ) The Java language is distributed

The Java language supports the development of Internet applications. Among the basic Java application programming interfaces, there is a network application programming interface ( java.net ), which provides a class library for network application programming, including URL , URLConnection , Socket , ServerSocket , etc.

( 4 ) The Java language is robust

Java 's strong type mechanism, exception handling, automatic collection of waste, etc. are important guarantees for the robustness of Java programs. The discarding of pointers is a wise choice of Java . Java 's security check mechanism makes Java more robust.

( 5 ) The Java language is cross-platform

The Java language is cross-platform, and the slogan "compile once, run anywhere" is put forward, because the Java source file ( .java ) is compiled into an architecture-neutral bytecode format ( .class ) on the Java platform , and then it can be run on any system that implements the Java platform (with JVM ). This approach is suitable for heterogeneous network environment and software distribution.

( 6 ) The Java language is portable

Java 's portability stems from its cross-platform nature. In addition, Java also strictly stipulates the length of each basic data type, which maintains a fixed length on different models. The Java system itself also has strong portability. The Java compiler is implemented in Java , and the Java operating environment is implemented in ANSI C.

( 7 ) The Java language is multi-threaded

In the Java language, a thread is a special object that must be created by the Thread class or its child (grandson) classes. The Java language supports the simultaneous execution of multiple threads and provides a synchronization mechanism between multiple threads.
 

1.3 Operating mechanism and virtual machine

        The biggest feature of a Java program is "compile once, run anywhere". The core of its implementation is the Java Virtual Machine (Java Virtual Machine, JVM), which is the core part of Java's cross-platform implementation.
       All Java programs will first be compiled into a platform-independent bytecode file (.class format) by the Java compiler. This file cannot be executed directly. It must go through a specific interpretation operation in charge of the JVM to generate machine code instructions that can be recognized by various local platforms before it can be executed, as shown in the figure.

Guess you like

Origin blog.csdn.net/u010764893/article/details/130882908