Java beginners must be aware of the 11 major features of the Java language

Source: Internet
Author: User

Java beginners must be aware of the 11 major features of the Java language

Java is a simple, object-oriented, distributed, interpreted, robust, secure, and structurally neutral static language with excellent performance and multithreading. What are the characteristics of java?

1. the Java language is simple.

The syntax of Java is very similar to that of C and C ++, making it easy for most programmers to learn and use Java. On the other hand, Java discards the rarely used, hard-to-understand, and confusing features in C ++, such as operator overloading, multi-inheritance, and automatic forced type conversion. In particular, Java does not use pointers and provides automatic waste collection, removing the need for programmers to worry about memory management.

2. Java is an object-oriented language.

Java provides primitives such as classes, interfaces, and inheritance. For the sake of simplicity, only single inheritance between classes is supported, but multi inheritance between interfaces is supported, and supports the implementation mechanism keyword implements between classes and interfaces ). The java language supports dynamic binding, while the C ++ language only supports dynamic binding for virtual functions. In short, Java is a pure object-oriented programming language.

3. the Java language is distributed.

Java supports Internet application development and has a Network Application Programming Interface (Java net) in the Basic java application programming interface. It provides a class library for network application programming, including URL, URLConnection, Socket, and ServerSocket. The remote method activation (RMI) Mechanism of Java is also an important part of distributed application development.

4. the Java language is robust.

Java's strong type mechanism, exception handling, and automatic collection of waste are important guarantees for Java program robustness. Discarding pointers is a wise choice for Java. Java's security check mechanism makes Java more robust.

5. the Java language is secure.

Java is usually used in network environments. Therefore, Java provides a security mechanism to prevent malicious code attacks. According to a java Training Instructor at Xi'an Dana Jiao Tong University, in addition to many security features of the Java language, Java has a security protection mechanism class ClassLoader for Classes downloaded over the network ), for example, if you allocate different namespaces to prevent local cognominal classes and byte code checks, and provide security management mechanisms such as SecurityManager, you can set security guards for Java applications.

6. the Java language is architecture neutral.

Java program files suffixed with java) files compiled on the Java platform as system-neutral bytecode files suffixed with class ), then it can run in any system implementing this Java platform. This approach is suitable for distribution of heterogeneous network environments and software.

7. the Java language is portable.

This portability comes from the Neutral architecture. In addition, Java strictly specifies the length of each basic data type. The Java system itself is also highly portable. the Java compiler is implemented in Java and the Java Runtime Environment is implemented in ansi c.

8. the Java language is interpreted.

As mentioned above, Java programs are compiled into bytecode on the Java platform and can then run in any system implementing the Java platform. During runtime, the Java interpreter on the Java platform interprets and executes these bytecode, And the classes required during execution are loaded into the runtime environment during the connection stage.

9. Java is high-performance.

Java is indeed of high performance compared with those of the interpreted high-level scripting language. In fact, Java's running speed is approaching C ++ with the development of JIT (Just-In-Time) compiler technology.

10. Java is multi-threaded.

In Java, a Thread is a special object, which must be created by the Thread class or its descendant class. There are usually two ways to create a Thread: first, use the constructor of Thread (Runnable) to package an object that implements the Runnable interface into a Thread. Second, the subclass is derived from the Thread class and the run method is rewritten. The object created using this subclass is a Thread. It is worth noting that the Thread class has implemented the Runnable interface. Therefore, any Thread has its run method, and the run method contains the code to be run by the Thread. Thread activities are controlled by a set of methods. Java supports simultaneous execution of multiple threads and provides the synchronization mechanism keyword synchronized between multiple threads ).

11. The Java language is dynamic.

One of the goals of the Java language is to adapt to the dynamic environment. The classes required by the Java program can be dynamically loaded into the runtime environment, or the required classes can be loaded through the network. This is also conducive to software upgrades. In addition, the class in Java has a runtime representation that can check the runtime type.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.