The differences between Java and C + + programs in compiling and running

Source: Internet
Author: User

Java, C + + are all high-level languages, and the computer can realize that only the machine code (that is, binary), so the high-level language must be directly or indirectly converted into a compilation, to run:

For the advanced computer languages such as C + +, their compilers (such as CC commands under UNIX, CL commands under Windows) can compile the source code directly into machine code that can be recognized by the computer, such as EXE, DLL, and then run directly

And the Java language cross-platform is one of its biggest features, which has reached the Java program Platform headless, so there is a certain sacrifice is more an intermediate process, the Java source program compiled into a class file "bytecode form" storage, It is then loaded by the JVM (the Java Virtual machine, which masks the operating system level, directly providing virtual hardware), and then interprets the bytecode as a machine instruction on the specific platform at execution time.

Each has its pros and cons, so we often say that C + + language is more efficient and Java language platform agnostic

The differences between Java and C + + programs in compiling and running

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.