1, Java operating mechanism, high-level computer programming language types are: compiled, interpreted, Java language is the two types of knot
The source file name: The main class name. java, using the compiler (JAVAC) to compile the source program
Bytecode-Bytecode file name: source file name. class, then use the virtual machine (interpreter, or Java) to interpret the execution, run the
Process: Load, code validation, interpretation execution.
2,. The Java Runtime Environment JRE contains: Java virtual machines, number of libraries, files required to run Java applications and applets,
JDK (also known as SDK) contains: JRE superset, compiler, debugger, etc. open anticipation tools.
3, there are three kinds of comments in Java, that is, single
Line comment (//), multiline comment (/**/), document comment
4, Java data types are divided into two categories, that is, the basic data types and reference data types, there are 3 types of basic data types 8
Basic data types (logical-boolean; text-type-char; numeric-byte, short, int, long, float, double),
Reference data types have classes (class), interfaces (interface), arrays (array), note that the size of the reference data type is uniform
is 4 bytes, 弽 is the address of its reference object!
5, byte type (1 bytes), short (2 bytes), int (4 bytes), Long (8 bytes), Float (4 bytes), double
(8 bytes).
6, Character type (2 bytes), single quote 杢 denotes character constants, for example ' a ' is a character, it does not "a" is not the same, "a" table
A string that contains one character, and a char type that uses 杢 to represent a character in a Unicode encoded table; Unicode encoding is designed
Use 杢 to process all text in various languages, which accounts for 2 bytes, allows 65,536 characters, ASCII 1 bytes,
Can be 128 characters, the first 128 characters in the Unicode encoding table, and Unicode has between 0 and 65535 remainders
encoding, they usually from ' \u0000 ' to ' \uffff ' remainders between the 16 import value 杢 representation (prefix u for Unicode); Java language
Word also allows the use of the escape character ' \ ' 杢 to forward subsequent characters to other meanings, such as \b for backspace, \ n for line break, \ r generation
Table returns, \ t for tabs (tab), \ "for double quotes, \ ' for single quotes, \ \ for backslashes.
7. The simplest form of an infinite loop: while (true) {} and for (;;) { }。
1.java Programming Basics