1. Data types can be divided into 2 categories: basic data types and composite data types.
Basic data types: integer, float, character, and character
Composite data types: array type, class, interface
Basic data Types1. Integral type Basic type (int) Short-Integer ( Short) long-integer (Long) byte type (byte)2. Floating-point single-precision number (float) and double-precision numbers (Double)3the character type in character Java is represented by Char. He uses 2 bytes (16 bits) to hold a character, and it does not store ASCII code but Unicode code. A Unicode code is a character encoding that is used on a computer. He sets a uniform and unique binary encoding for each character in each language. And Unicode is ASCII code-compatible with all ASCII characters, will be added in the high-byte position 0, to become a Unicode code. For example: The ASCII code A is 0x61, in Unicode, the encoding is 0x0061.4. Boolean Type Boolean (Boolean). Used for processing logic is worthwhile. Take only 2 valuestrueAndfalseThe conditions are either established or not established, respectively.
2. Integral type data
Can be divided into integer constants and integer variables
Integral type constant
integer constants consist of one or more numbers that can be signed, and are divided into decimal, octal, and hexadecimal according to the different binary types. Decimal: 123,-123,0 octal : Specifies that the octal number begins with 0. For example, 0123 means octal number 123, equal to decimal, 011 equals decimal -9. 16 binary: Hexadecimal number starting with 0x or 0X
Integer variable
integer variables can be divided into byte type (byte), short integer (Long), and basictype (int) in different bytes.
3. Transfer sequence and its meaning
character form meaning \ n newline \ t horizontal tab \v vertical jump lattice \b backspace \ r return \ \ backslash "\" \ " \ " double quotes" ""\uhhhh Unicode codes represented by 1-4-bit 16 binary numbers
Zero-based JAVA-3. Java Data type