PS: The following points, do not understand actually does not matter, just first know, so look good, do not go to the heart, to learn Java again look back, you understand.
1.Java is a highly creative object-oriented programming language introduced by Sun in 1995.
The father of 2.Java is a Fellow of the Sun Academy: James Gosling (James Goslin).
3.Java is a language that is executed through interpretation, (please understand the explanatory and compiler explanations below) so Java's cross-platform is very good, the Java language Program, can run on any platform and device, such as IBM PC, Mac Apple Computer, a variety of micro-processing hardware platform , as well as system platforms such as Windows, UNIX, MAC os. Summary: "Write once, run everywhere".
A program written in 4.Java language is both compiled and interpreted (believe you have understood the explanatory and the compiler, and have doubts to keep looking).
The program code is compiled and converted into an intermediate language called Java bytecode, and the Java Virtual Machine (JVM) interprets and runs the bytecode.
Compilation occurs only once, and interpretation occurs every time the program is run.
The compiled bytecode is saved as a machine code optimized for the JVM, and the virtual machine interprets the bytecode as a machine code and then runs on the computer.
Java program compiling and running process: program source code → compiler → bytecode →jvm→ machine code → Computer
The JVM, for efficiency, has some optimizations for JIT, and it compiles the. class binaries into local code to run directly, so Java-written programs are compiled as well.
Explanatory and compiler
Explanatory: In contrast to a compiled language, the source code is not directly translated into machine language, but translated into intermediate code, and then interpreted by the interpreter to run the intermediate code.
Explanatory advantages and disadvantages: Slow execution speed, low efficiency, rely on the interpreter, cross-platform good.
Interpreted language: The program does not need to compile, the program is translated into machine language at run time, each time the execution is translated once, so the efficiency is low.
Compiler: Relative to the existence of the interpreted language, the compiled language will first compile the source code to generate machine language, and then the machine running machine code (binary).
The advantages and disadvantages of the compiler: fast execution, high efficiency, relying on the compiler, cross-platform poor.
Compiled language: The program needs a special compilation process before execution, the program is compiled into machine language files, the runtime does not need to re-translate, directly using the results of the compilation is OK.
<java Basic > Initial knowledge of Java <1>