Middle Examination Report:
The differences between Java and C++
19335286 郑有为
Java programming language is a high-level language developed from
C++ and becomes a new generation of object-oriented programming
language. Here are six aspects of differences between Java and C++,
including the process of creating an executable file & portability, object-
oriented programming, inheritance, polymorphism, memory management
and so on.
1. The process of creating an executable file & portability
C++ is a compiled language whose implementations are typically
compliers (translators that generate machine code from source code), and
not interpreters (step-by-step executors of source code, where no pre-
runtime translation takes place). To generate a .exe file from .cpp file, it
needs preprocessing, compiling (translates source file to assemble file),
assembling and linking orderly.
However, Java is a semi-compiled and semi-interpreted language.
The .java file will be compiled into .class file by javac. A .class file does not
contain code that is native to your processor, it contains bytecodes — the
machine language of the Java Virtual Machine. The Java launcher tool then
评论0