The first chapter basic concepts
Java works
Prepared in Notepad orIDE in Java source code (suffix .java files)
-> compiled, without being given by a compiler (javac compiler), is generated .class file is composed of bytecode
-> in the corresponding the bytecode execution on the Java virtual machine (JVM Java virtual machine)
as shown below:
A Brief History of Java
Java was originally intended to solve the problem can not be cross-platform C ++ to simplify C ++ such as multiple inheritance, pointers, etc. difficult to understand the syntax and memory management and disclosure. The beginning of a great Java1.0 functional limitations, and running very slow, but in later development, address many problems.
Java program structure
- Source file source file:
file programmer can write the same C / C ++, expand a .java - Class class file:
a program component, a source file may contain a plurality of classes - The method of method:
a function or a process, a method class may comprise a plurality of - Sentence statement:
statement stored in the method