Beijing Satellite TV Network

Title: Chapter One: An overview of Java [Print this page]

Author: admin    Time: 2024-02-15 11:29:31     Title: Chapter One: An overview of Java

Java language is from Oracle Sun Corporation. It is a computer programming language that can be used for high-performance enterprise computing platforms, desktop computing platforms, and mobile computing platforms at the same time. Currently, there are billions of desktops and mobile phones running Java programs, and there are countless programs developed using the Java language worldwide.

Firstly, The origin of the Java language.

The predecessor of the Java language is the OAK language, which was a language introduced by the American Sun Microsystems company in 1991 and was only used within the company. In 1995, Sun changed the Oak language to the Java language and officially introduced it to the public. Since then, the Java language has been continuously updated, its built-in libraries have become richer and more performant, and its application fields have significantly expanded. It has become one of the most common and popular software development languages today and is the preferred development language for many professional developers. In 2009, the American Oracle company acquired Sun, and since then, the updated versions of the Java language have been released by Oracle.

The Java language is oriented towards network applications, mainly including the Standard Edition (Java 2 Platform, Standard Edition, J2SE), the version for high-performance enterprise computing (Java 2 Platform, Enterprise Edition, Java2EE), and the version for high-performance mobile computing (Java 2 Platform, Micro Edition, Java2ME). This book only introduces the Java Standard Edition, Java2SE.

Java is a powerful programming language. It is not only a development environment and an application environment. It represents a new computing model. In 1993, the popularity of the Internet provided an opportunity for Java to exert its potential. Figure 1-1 illustrates the basic concepts of the Java language: The Java language, is an object-oriented programming language, a machine-independent binary format class language, a Java virtual machine is used to execute class files, a complete software package, cross-platform APIs, and built-in libraries. This is the basic concept of the Java language.

Secondly, the characteristics of the Java language. Java is a simple, object-oriented language with distribution, security, and robustness. Its initial version was interpreted and executed, and the current version adds compiled execution. It is a multithreaded and dynamic language, and most importantly, it is platform-independent, solving the software portability problem that has plagued the software industry for many years. Since the birth of the Java language, it has received worldwide attention. The emergence of Java marks the arrival of a new computing era, which is the Java computing era. The numerous outstanding features of Java have made it popular with the public. In fact, Java conforms to the mainstream of object-oriented programming currently, and it has the following significant features.

1. The syntax is simple, powerful in funtion, and safe and reliable.

Java is a language similar to C++, and there are many syntax and concepts in the two languages that are the same or similar. On the other hand, Java removes the less commonly used and error-prone areas in C++. For example, Java does not have pointer structures and type definitions, and there are no global variables, no preprocessor such as '#include' and '#define', nor the mechanism of multiple inheritances. The Java language has a dynamic unused memory recovery mechanism, and programmers do not need to release the occupied memory space by themselves, so it will not cause system crashes due to memory chaos. Java is a strongly typed language, and the compilation process must indeed strictly follow programming specifications, and the compilation program can detect as many syntax errors as possible.

Java emphasizes the object-oriented feature and is a purely object-oriented language. Java programs implement code reuse, information hiding, dynamic binding and other features through the encapsulation of objects, class inheritance, and method polymorphism. It can develop very complex systems, but without losing the readability of the program.

Java programs implement a three-level code security check mechanism in the language definition stage, bytecode checking stage, and program execution stage, which conducts strict checks and controls on parameter types, matching objects, access permissions, memory recovery, and so on. It can effectively prevent the intrusion of illegal codes, prevent unauthorized access to memory, and avoid the possibility of virus attacks.
Secondly, it is platform-independent.

A very important feature of the Java language is its platform-independence. The Java virtual machine (Java Virtual Machine, JVM) is the key to achieving this feature.

The Java virtual machine is a virtual computer that achieves various computer functions by simulating on an actual computer. Different operating systems have different virtual machines. It is similar to a small and efficient CPU.

When a high-level programming language runs on different platforms, it needs to compile it into different target files according to the machine instruction set of the local computer. However, the JVM shields the differences of specific platforms. The Java editor edits the Java program into binary code that the virtual machine can recognize. This code is called bytecode. The bytecode is the machine instruction of the virtual machine, which is platform-independent, has a unified format, does not depend on the specific hardware environment, and only runs on the JVM. These codes can be executed on any system with a Java runtime environment installed. When the Java virtual machine executes the bytecode file, it interprets the bytecode into machine instructions on the specific platform, so the Java program does not need to be recompiled when running on different platforms.

The Java language defines a unified data type with strict syntax definitions. The same data type is consistent on any platform, which provides great convenience for the seamless porting of Java programs across platforms.

3.Two ways of operation: interpretation and compilation















Welcome to Beijing Satellite TV Network (http://bjstn.com/) Powered by Discuz! X2