Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is Java technology? What are the applications?
What is Java technology? What are the applications?
Category: Computer/Network >> Software

Analysis:

1, Java basic edition

Java is a new object-oriented programming language developed by sun Company, which is mainly used for the design of web pages.

The development of Java language is legendary, which is closely related to the rapid development of WWW of Inter. Because of its rapid development, some people compare it to an international esperanto. As mentioned above, the design of web pages on the Internet uses HTML language. With the help of web browsers (such as Netscape, HotJava, IE, etc. ), users can access static Web pages with hyperlinks on remote web servers. The appearance of Java language has changed the traditional static web page mode. By adding some apps1et (called applets) written in Java to the webpage, it can make the webpage more varied and allow users to visit dynamic and interactive webpages.

For example, some small animations, real-time updated charts, sounds and so on. In short, the design of web pages mainly adopts HTML language, and Java is the icing on the cake.

Sun officially launched the Java language in May, 1995. Because of its simplicity, high efficiency and strong portability, it quickly attracted the attention of users and many manufacturers, especially Sum Company positioned it as the application development of Inter, which enabled Java to develop rapidly. At the same time, a browser called Hotjava (Hot Coffee) was launched. HotJava is a web browser written entirely in Java language and based on typical Java applications. It is the first one to support Java Applet. HotJava fully demonstrates the powerful power of Java on the global Internet and provides an ideal platform for Java programming.

After the introduction of Java language, major software vendors have announced their support for Java. First, Netscape supports Java in its web browser (Netscape Navigator2.0). Soon, sun, SGI and Macromedia established an open multimedia standard based on Java. Later, many companies, such as IBM, Microsoft, Orac 1e, announced their support for Java. Netscape further cooperated with sun Company to launch a JavaScript language similar to Java. At present, Sun Company has set up a special Javasoft department to manage the development and maintenance of Java language (see Http:Javasoft for details).

For the name Java, the popular saying is that it comes from an important island in Indonesia. The Chinese translation of the island is "Java", and the island is rich in coffee. So the developer of sun Company named this new language Java, which means to connect it with steaming coffee and dedicate it to computer users all over the world.

Characteristics of 2.Java Language

The popularity of Java language lies not only in its ability to compile Applet embedded in HTML files, but also in its characteristics of object-oriented, simplicity, platform independence, security and multithreading. The structure and writing method of Java language are similar to those of c++ language. Therefore, to learn the Java language, we should not only understand the unique programming characteristics of the Java language, but also have the programming foundation and object-oriented concept. The main features of the & ltBR & gtJava language are as follows:

(1) simple and efficient

The Java language is similar to C++. If users understand the concepts of c++ and object-oriented, they can write Java programs quickly. In addition, Java is different from various methods provided by c++ language. It only provides basic methods and reduces the complexity of programming, such as removing complex features such as header files, pointer variables, structures, operator overloading and multiple inheritance. Although the Java language is simple, it is very efficient. It can describe every action of the user in an object-oriented way.

(2) Object-oriented

Java language is a new object-oriented programming language. Except for a few basic data types, most of them are similar to the objects and methods in C++. Most program codes embody the class mechanism, are organized in the form of classes, and define various behaviors of objects. Java also supports class inheritance, which also reduces the complexity of programming.

(3) Platform-independent Java language compiles and generates bytecodes independent of computer hardware structure, which are defined as independent of any hardware platform and operating system. When a Java program runs, it needs to be interpreted and executed by an interpreter. This shows that Java language is platform-independent, so Java programs can run on any platform, such as MS-DOS, Windows, Unix and so on. Therefore, it has strong portability.

(4) Interactive function

Java is an object-oriented network programming language. Because it supports TCP/IP protocol, users can access various dynamic objects on Inter through browsers. And users can perform various actions interactively on the network. The introduction of multithreading technology makes this interactive operation easier.

(5) multithreading mechanism

Java language supports multithreading mechanism, which enables Java programs to handle multiple tasks in parallel. Java programs can be designed as multi-threads, for example, one thread is responsible for data retrieval and search, and the other thread interacts with users, so that the two threads can execute in parallel. Multi-thread mechanism can easily realize interactive operation on the network.

(6) Dynamic memory management mechanism

Java language adopts automatic garbage collection mechanism to manage memory. In c++ language, programmers should be careful to deal with the use of memory when writing programs. For example, when a certain memory is running out, it should be released in time for other programs to use. Once the memory is not properly managed, it may cause a waste of memory space or a program failure. & ltBR & gtJava system contains an automatic garbage collector, which can automatically and safely collect unused memory blocks, so that programmers don't have to worry about memory management when programming, thus making the writing of Java programs simple and reducing the possibility of memory management errors.

(7) Safety

In a distributed network environment like Inter, security is a problem that can't be ignored. Java language introduces real-time memory allocation and layout in security to prevent programmers from directly modifying physical memory layout; Byte codes are checked by byte code checker to prevent network viruses and other illegal codes from invading. In addition, Java language also adopts many object-oriented exception handling mechanisms, which are responsible for handling some abnormal events, such as insufficient memory space and abnormal termination of programs. & ltBR & gt The main features of the Java language are introduced above. In addition, it also has the characteristics of dynamic, rich class libraries and high performance, which makes the Java language mature and perfect in all aspects and become one of the more and more popular programming languages.

3.Java application and Java AppletJava language are an object-oriented programming language. Using Java language, you can write two kinds of programs: Java application and Java App 1et (applet):

Java applications are written in Java language, and can run independently on MS-DOS, UNIX and other operating platforms after compilation and interpretation. Java applications usually run on the command line.

Java applets cannot run independently. App 1et must be embedded in an HTML file, and you need to start a browser to run it. In this way, the designated applet will be automatically downloaded to the user's browser to run, thus producing some special page effects, such as animation, sound, charts, images and so on. By embedding Applet in web pages, we can interact dynamically between web pages and users, such as receiving users' input, and then generating different responses according to users' needs.

As far as Java applets are concerned, they are embedded in HTML files. Most of the contents presented in HTML files are words, pictures, tables, sounds and so on. But these contents are generally static and two-dimensional. However, when a small program is embedded in an HTML file, the whole page will present diversity and variability, such as interactive functions, charts and so on. The difference between Java language and HTML language in application lies in:

(1)HTML language is a simple markup language, and ordinary users can learn how to write HTML documents in a few hours. The structure and writing method of Java language are more similar to C++, so learning Java language should be based on programming and object-oriented concept.

(2) Web pages are mainly written in HTML language, but if you want to make pages more changeable, diverse and interactive, you can use Java language to achieve this effect and play a icing on the cake.

4. Embedding Applet in HTML files

There are a large number of apps1et on Inter, and most of these small programs are designed by Java developers of Sun and other companies. For users, especially beginners, these apps1et can be downloaded to their own computers, and then these downloaded apps1et can be embedded into their own web pages to obtain their own web pages with the same effect, thus enriching their own page content.