Java-java language

Source: Internet
Author: User

2017-10-03 21:25:38

Java is an object-oriented programming language, not only absorbs the various advantages of the C + + language, but also rejects the difficult to understand C + + inheritance, pointers and other concepts, so the Java language has a powerful and easy to use two features. As the representative of static object-oriented programming language, the Java language implements the object-oriented theory, which allows programmers to do complex programming in an elegant way. Java has also been dubbed the C + +--。

First, the three major platforms of Java

Second, the characteristics of the Java language

    • Easy to learn

The Java language is simple. The simplicity here is for program designers familiar with the C + + language, because its syntax is very similar to C + +, but it rejects many of the low-level, difficult, confusing, error-prone or infrequently used features in C + +, such as operator overloading, pointer arithmetic, program preprocessing, structure, Multiple inheritance and some other content . Also has automatic memory management, the data length is fixed,

    • Efficient way of execution

The source program that is edited in the Java language is executed in a way that is compiled first by the compiler and then interpreted using the interpreter . It synthesizes the many advantages of explanatory language and compiling language, and makes its execution more efficient than the previous programming language.

    • Platform agnostic

Java source program is compiled by the compiler, will be converted into a bytecode (byte-codes) of the target program, the biggest feature of bytecode is the ability to run across platforms, the program designers often say " compile once, run everywhere ."

    • Security

The storage allocation model for Java is one of the main ways it defends against malicious code. Java has no pointers, so programmers can't get the hidden insider and forge pointers to the memory. More importantly, the Java compiler does not handle storage scheduling decisions, so programmers cannot guess the actual storage schedule of classes by looking at the claims. Stored references in compiled Java code are at runtime determined by the Java interpreter to actually store the address.

The Java bytecode enters the interpreter that specifically handles the content, which must first be checked by the bytecode checker, and then the Java interpreter determines the memory distribution of the classes in the program.

    • Support Multithreading
    • Extensive library of API classes

Third, Java operating mechanism

Java three core mechanisms:Java Virtual Machine, code security detection, garbage collection mechanism .

1. Java Virtual machine

    • Compilation and operation of Java programs

The Java language Editor's method of executing the source program is compiled by the compiler and then interpreted using the interpreter.

    • Java Virtual machine (Java MACHINE,JVM)

2. Java Runtime Environment (Java Runtime Environment:jre)

JRE = JVM + API

The three main functions of the JRE when running the program: Load code: Completed by class loader; Checksum code: completed by bytecode verifier; execution code: run by Runtime interpreter.

3. Garbage collection mechanism

4, Java Development Kit (Java development kit:jdk; also called software development KIT:SDK)

Java-java language

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.