Java language generation and characteristics

xiaoxiao2021-03-06  39

History and status of Java

History of Java

Java came from Sun's project called Green, its original purpose was to develop a distributed code system for household consumer electronics, so we can send E-mail to refrigerators, TV sets, etc. Control, communicate with them. Start, ready to use C , but C is too complicated, the security is poor, and finally based on C develops a new language Oak (Java's predecessor), Oak is a language for the exquisite and secure language, Sun has bidding A interactive television project, but the result is defeated by SGI. Poor OAK almost homeless, happening MOSAIC and Netscape developed by Mark Ardresen in this time, the Oak project group members, they have prepared the Hotjava browser with Java, got the support of Sun CEO SCOTT MCNEALY, triggered Java Entering the Internet. Java's name is also a song. One day, a member of several Java member groups is discussing what name to this new language, when they are drinking Java (Java) coffee in the cafe, there is a person to say Java What is it, I got the appreciation of others, so the name of Java is open.

Java's status quo

Java is a new generation of object-oriented programming languages ​​launched by Sun, especially suitable for Internet applications, and its platform is unrelated directly to Wintel's monopoly position. For a time, "even the Internet, use Java programming", becoming a stylish of technicians. Although the news of the press has some speech, Java has been a revolutionary technology developed by software, and its status has been established, which is in the following aspects: 1. Many large companies in the computer industry have purchased Java licenses. Including IBM, Apple, DEC, Adobe, Silicon Graphics, HP, ORACEL, TOSHIBA, and the most reluctant Microsoft. This description, Java has been recognized by the industry. 2, numerous software developers began supporting Java software products. For example: Borland is developing Java-based fast application development environment Latte, which is expected to be released in mid-1996. Borland's initiative promoted Java to enter the PC software market. Sun's own Java development environment Java Workshop has been released. Database manufacturers such as: Illustra, Sysbase, Versant, Oracle are developing CGI interfaces, supporting HTML and Java. Today is a network-centered calculation era, does not support HTML and Java, and applications can only be limited to homogeneous environments (the same hardware platform). 3, intranet is becoming the best solution for enterprise information systems, and Java will play an irreplaceable role. The purpose of intranet is to put the Internet for internal information systems within the enterprise. Its advantage is: inexpensive, easy to use and manage. Regardless of the type of machine and operating system, the interface is a unified Internet browser, and the database, web page, application (applet with Java) exists on the WWW server, whether it is developer or executive, Or the user can benefit from the solution. The Java language is constantly developing and improving. Sun is the main development and promoters, and more common compilation environments are JDK (Java Develop Kit) and JWS (Java Workshop). There are many other companies being developing the Java language compiler and integrated environment. It is expected that the correctness and efficiency of the Java language will be improved, and the user is programmed with Java and now uses C programming. Characteristics of Java language

What kind of language is JAVA? Java is a simple interpretation of a simple interpretation of the object, a strong structure, unique, multi-threaded dynamic language.

simple

Java was originally designed to integrate control of household appliances, so it must be simple and clear. The simplicity of the Java language is mainly reflected in the following three aspects: 1. Java style is similar to C , so the C programmer is very familiar. In a sense, Java languages ​​are a variant of C and C languages, so C programmers can quickly master Java programming technology. 2, Java eliminates the place where the program is easy to trigger in C , such as pointers and memory management. 3, Java offers a rich library.

Object-oriented

Object-oriented can be said to be Java's most important feature. The Java language is designed to be object-oriented, it does not support the process-oriented programming techniques like C language. Java supports static and dynamic code inheritance and reuse. From the object-oriented characteristics, Java is similar to SmallTalk, but other features, especially those suitable for distributed computing environments far beyond SmallTalk. distributed

Java includes a sub-library that supports HTTP and FTP and other TCP / IP protocols. Therefore, Java applications can open and access objects on the network with the URL, which is almost identical to accessing the local file system. It is undoubtedly a very magnificent task for the distribution environment, especially the Internet, but Java's grammatical features make us easily implement this goal.

robust

Java is committed to checking the program in compiling and runtime errors. Type Check Help Check out many early development errors. Java self-manipulating memory reduces the possibility of memory error. Java also implements a true group to avoid possible possible overlay data. This feature greatly reduces the cycle of developing Java applications. Java provides NULL pointer detection array boundaries detection exception exit byte code check.

Structural neutrality

In addition, in order to establish Java as a whole, Java compiles its program into an intermediate file format neutralized. This intermediate code can be performed as long as there is a Java running system. Now, the Java running system has Solaris 2.4 (SPARC), Win32 system (Windows 95, and Windows NT). The Java source program is compiled into a high-level Byte-Code format language that is unrelated to the machine, which is designed to run on the virtual machine, implemented by the machine-related running debugger.

Safety

Java security can be guaranteed from two aspects. On the one hand, in the Java language, the C function such as pointer and release memory is deleted to avoid illegal memory operations. On the other hand, when Java is used to create a browser, the language function and the functionality provided by a browser itself make it more secure. The Java language has been tested many times before you execute on your machine. It passes the code check, check the format of the code segment, detects the pointer operation, whether the object operation is excessively, and attempts to change the type of object.

BYTE-CODE verification

If BYTE-CODE passes the code check, we can know that the code does not have the stack overflow and overflow all operation code parameter types are correct without illegal data conversion, such as converting integers into pointers. Access object operation is legal.

Class loading

Class Loader maintains security by dividing the native class with the name of the network resource class. Because it is always inspected when the class is transferred, this avoids the emergence of Trojan horses. The class downloaded from the network is transferred to a private name domain that is related to the source. When a private class accesses another class, build-in (this machine class) is first checked and then checks the associated class. This avoids the emergence of destroying the situation.

Portable

The same architecture is independent of the Java application to run on any computer system equipped with a Java interpreter and a running environment, which has become a good foundation for Java applications for porting. But just so much not enough. If the basic data type design depends on the specific implementation, it will also bring great inconvenience to the transplant of the program. For example, in Windows 3.1 (Integer) is 16bits, the integer in Windows 95 is 32bits, and the integer in Dec Alpha is 64bits, 32bits in Intel 486. Java data is consistent on any hardware platform by defining the basic data types independent of the platform and its operations. The basic data type of Java language is as follows: byte 8-bit binary complement Short 16-bit binary complement INT 32-bit binary complement LONG 64-bit binary complement Float 32-bit IEEE 754 floating point Double 32 -BIT IEEE 754 floating point CHAR 16-bit Unicode character In any Java interpreter, the data type is implemented in accordance with the above standards. Because all CPUs that are almost currently used can support the above data types, the complement operations and single / double precision floating point operations in 8 ~ 64-bit integer formats. The Java compiler itself is written in Java language. The preparation of the Java computing system is based on the restrictions on the POSIX, and written in ANSI C. There is no "same specific implementation" in the Java language specification.

Interpretation

The Java Interpreter (Running System) can directly run the target code instruction. Links are usually less resources required by the compiler, so programmers can spend more time on creating a source.

high performance

If the interpreter speed is not slow, Java can translate the target code directly into a machine instruction at runtime. SUN can call 300,000 processes within a second of the direct interpreter. The speed of translation of the target code is nothing difference with the performance of C / C .

Multithreading

The multi-threaded features provided by Java allows multiple small tasks in a program. Threads - Sometimes it is also known as a small process - is a small independent process you have eigned in a large process. Because of the multi-threaded technology implemented by Java, it is more important than C and C . The greater benefits of multi-threading are better interaction performance and real-time control performance. Of course, real-time control performance depends on the system itself (UNIX, Windows, Macintosh et al.), Which is better than single-threading, and performance. Anyone who has used the current browser feels that it is a very troublesome thing to adjust a pair of pictures. In Java, you can use a single-thread to call a pair, and you can access other information in HTML without having to wait.

dynamic

The dynamic characteristics of Java are expansion of their object-oriented design methods. It allows the program to dynamically load the class required during the run, which is unable to implement the Object-oriented programming design in the C language. During the C programming process, whenever one instance variable or a member function is added to the class, all subclasses reference to this class must be recompiled, otherwise the program will crash. Java takes measures from the following aspects to solve this problem. The Java compiler is not compiled into a numerical reference to the reference to the instance variable and the member function, but the symbol reference information is passed to the interpreter in the bytecode, and then the interpreter is referenced by the interpreter after completing the dynamic connection class. The information is converted to a numerical offset. Thus, an object generated in the memory is not determined during the compilation process, but is determined by the interpreter when it is delayed. In this way, it is not possible to affect the existing code when updating the variables and methods in the class. When explaining the execution bytecode, the lookup and conversion process of this symbol information is only once when a new name appears, and the code can be performed at full speed. The advantage of determining references at runtime is that you can use the already updated class, but don't worry that you will affect the original code. If the program is connected to a class in another system in the network, the owner of the class can also update the class freely without the crash of any program that references the class. Java also simplifies the use of an upgrade or a new protocol. If your system is running a Java program, I have encountered a program that I do, it doesn't matter. Java automatically downloads the functional program you need. Similarities and differences with C and C languages

Java provides all functions of a powerful language, but there is almost no characteristics. C security is not good, but C and C are also accepted by everyone, so Java is designed into C form, so that everyone is easy to learn. Java removes many of the functions of the C language, let Java's language functions are refined, and add some of the useful features, Java removes the following C and C features and features: pointer computing structure, typedefs, #define, need to release The definition of memory global variables, which is easy to cause errors.

Java application introduction

Web browsing

Web browsing is the main way of current international network or even a local area network. Documents can easily display text and various pictures, and he can provide hypertext links. These browsers call the Document written by the HTML language, HTML / WWW browser technology is limited to text and images. If you want to play a sound or run a demo, you have to download it with the file that you can understand and run the file format. Java programs and its browser Hotjava provide methods that allow your browser to run programs. You can play the sound directly from your browser. You can also play animations in the page. Java can also tell your browser how to handle new type files. When we can transfer video images on the 2400 BAUD line, HotJava will be able to display these video.

Network application system

Java is a language-independent language, so the network application system developed with Java can run on various platforms, greatly increase development efficiency and reduce duplication of labor. Moreover, Java integrated network functions are fully conducive to the development of network application systems.

Summary:

1. Java's production and popularity is the objective requirements of today's Internet development. 2, Java is a good programming language in all aspects. Its basic feature is simple, an iconic object, distributed, interpretation, sound, Safe, structural neutrality, portable, excellent performance, multi-threaded, dynamic. It is very suitable for developing an application system in an Internet environment. 3, Java can make most of the network application system, and combine with today's popular WWW browser.

转载请注明原文地址:https://www.9cbs.com/read-78377.html

New Post(0)