1. java programming basics and java basic programming exercises
1. the operating mechanism of Java. The types of advanced computer programming languages include compilation and interpretation. Java is the combination of these two types.
Compile the Java source program using the editor-source file name: Main class name. java, and compile the source program using the compiler (javac ).
Into bytecode-bytecode file name: source file name. class, then use the Virtual Machine (Interpreter, that is, java) to explain and execute, run
Processes: Loading, code verification, and interpretation.
2. Java Runtime Environment JRE includes: Java virtual machine, number of library partitions, files required to run Java applications and applets,
JDK (also known as SDK) includes: JRE superset, compiler, debugger, and other development tools.
3. There are three annotations in Java: single
Line comment (//), line comment (/**/), document comment
4. Java data types are divided into two categories: Basic Data Types and reference data types. There are three types and eight types of basic data types.
Basic data type (logical-boolean; text-char; Numeric-byte, short, int, long, float, double ),
The referenced data types include class, interface, and array. Note that the referenced data types are of the same size.
The value is 4 bytes, which indicates the address of the referenced object!
5. Byte type (1 Byte), short (2 Byte), int (4 Byte), long (8 Byte), float (4 Byte), and double
(8 bytes ).
6. bytes (2 bytes). single quotation marks (") indicate character constants. For example, 'A' is A character, and it is not" A ", it is different." A "table
Indicates a string containing one character. The char type is represented by character in the unicode encoding table. The unicode encoding is designed
The Delimiter is used to process all texts in various languages. It occupies 2 bytes and can contain 65536 characters. The ASCII code occupies 1 byte,
It can contain 128 characters, which is the first 128 characters in a unicode-encoded table. unicode has a range from 0 to 65535 bytes.
Encoding. They are usually represented by a 16-digit value between '\ u0000' and' \ uffff' (prefix utable shows unicode). Java
You can also use the Escape Character '\' to forward the subsequent characters to other meanings. For example, \ B Indicates backspace, \ n indicates line feed, and \ r indicates
Press enter, \ t, tab, \ ", double quotation marks, \ ', single quotation marks, \, and backslash.
7. The simplest form of an infinite loop: while (true) {}and (;;){}.