Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.
1. Data types (eight types):
1. The computer's storage carry: bit is the smallest unit of storage data, and so on, as shown in the figure:
2. In java we can use 0b or 0x to represent binary and hexadecimal
Such as: 0xABC or 0b01010001;
3. In the data storage in java, the high bit is 1 is a negative number, and the high bit is 0 is a positive number;
4. Detailed explanation of Java data types:
Integer value: int short: less than 32767 byte: less than 127
Decimal value: double
Single quotes: char (numbers can be assigned) boolean: true, false
①Integer type (four types): byte short int long, as shown in the figure:
②Character type: char, as shown in the figure:
③Floating point type: float double
④ Boolean type: boolean