Java Learning Notes (i) Background knowledge

Source: Internet
Author: User

1. Is Java a compiled or interpreted language?

(1) Java is a compiled language (Java source code compiled into byte code, that is, *.class file), but also the interpretation of the language (by the interpreter to interpret the bytecode operation);

(2) Java is neither a purely compiled language (machine code that does not produce a specific platform) nor a purely interpretive language (not the source code, but the bytecode)

2. How to understand Java Virtual machine?

(1) Java Virtual machine (JVM Java VM) is responsible for interpreting the execution of bytecode files in the Java language;

(2) The Java compiler is responsible for generating code that is understood by the virtual machine, which is then interpreted by the virtual machines, and all of the platforms have the same programming interface to the compiler;

(3) In the implementation of some virtual machines, the virtual machine code is converted into the machine code execution of the characteristic system, thus improving the execution efficiency;

3. How does Java implement cross-platform?

(1) Java source code compiled into platform-independent bytecode, bytecode only for the JVM, different platforms on the JVM have different implementations, but their interface is the same;

(2) As long as the JVM is implemented on different platforms, the compiled Java bytecode can be run on these platforms, without the need to compile (compile at once, run everywhere)

Java Learning Notes (i) Background knowledge

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.