Are learning Java, said Java is the best language, then you know Java What are the advantages?

Java technology has the following advantages: simplicity, object-oriented, distributed, interpreted, robust, secure, architecture-neutral structure, portable, high-performance, multi-threading and dynamic.

1. Simple

Java is an object-oriented language, complete the tasks assigned to it by providing the most basic way, just understand some basic concepts, you can use it to write for a variety of situations applications. Java omitted vague concept of operator overloading, multiple inheritance, etc., and by automatic garbage collection greatly simplifies the programmer's memory management. In addition, Java is also suitable for running on a minicomputer, it supports basic interpreter and class is only about 40KB, plus support for standard library and the thread is only about 215KB.

2. Object-Oriented

Java language is designed to focus on the object and its interface, which provides a simple class mechanism and dynamic interface model. Object encapsulates its state variables and a corresponding method, and information hiding modularized; the prototype of a class provides a class of objects, and by the inheritance mechanism, the parent class subclass provided may be used to achieve the code reuse.

3. Distribution of

Java is a network-oriented language. By class library can handle it provides TCP / IP protocol, users can easily access other objects across a network via a URL address.

4. Robust

When you compile and run Java programs on the problems that may arise should be examined to eliminate errors. It provides automatic garbage collection for memory management, prevent errors when programmers manage memory easily generated. At compile time, exception handling mechanism through integrated object-oriented, Java suggesting abnormal but untreated possible, to help programmers properly selected to prevent collapse of the system. In addition, Java at compile time can also capture many common error type declaration, to prevent mismatches dynamic run-time.

5. Security

For networking, Java in a distributed environment must be protected against virus invasion. Java does not support pointers, all access to memory must be achieved through instance variables of an object, thus preventing the programmer using the "Troy" Trojan horse to access the object of deception private members, but also to avoid the prone pointer operation error.

6. architecture-neutral

Independent Java interpreter generates bytecode instructions and architecture, as long as the Java runtime system installation, Java programs can run on any processor. These bytecode instructions corresponding to the Java virtual machine is represented, resulting Java byte code interpreter, it converts it to enable it to run on different platforms.

7. Portability

Platform-independent feature enables Java programs can be easily ported to different machines on the network. At the same time, Java class library also implements the interface with different platforms, so that these libraries can be transferred. Further, Java compiler is implemented by the Java language, C language system is implemented by a standard Java runtime, which makes the Java system itself portability.

8. interpreted

Java interpreter directly execute Java byte code interpretation. Byte code itself carries a lot of compile-time information, making the connection process easier.

9. High Performance

And other interpreted languages, such as BASC, TCL different, Java bytecode is designed so that it can easily be converted directly into machine code corresponding to a particular CPU, thereby obtaining higher performance.

10. Multithreading

Multithreading enables applications to be executed in parallel, and synchronization mechanisms to ensure the correct operation of the shared data. By using multiple threads, the programmer can do specific behaviors with different threads, respectively, without the need to use the global event loop mechanism, so that it is easy to achieve real-time interactive behavior on the network.

11. dynamics

Java is designed to make it suitable for an evolving environment. In the class library can freely add new methods and instance variables without affecting the user program execution. And Java to support multiple inheritance through the interface, making it inherited a more flexible way and scalability than the strict class.

Published 61 original articles · won praise 17 · views 1403

Guess you like

Origin blog.csdn.net/cxytony/article/details/103702479