Basic data types based on JAVA, java Data Types
Basic Data Type:
1. numeric type 1) integer: 1. byte: one byte, eight digits. value range: 0 ~ 255, used to store binary data. 2. Two short bytes, 16 bits. The value range is-32768 ~ In the range of 32767. 3. Four int bytes, 32 bits, value range:-2147483648 ~ The value range is-2147483648. The value range is-9,223,372,036,854,775,808 ~ Between 9,223,372,036,854,775,807 and 2) float: 1. float, four bytes, single-precision floating point number, range:-2 ^ 128
~ + 2 ^ 1282, double, eight-byte double-precision floating point number, range:-2 ^ 1024
~ + 2 ^ 1024 II. String: char, a set of data. 3. boolean: boolean. There are only two values. One value is true and the other value is false. 4. String: String, basic data type conversion: from low to advanced, char → int → long → float → doublebyte → short → int can be automatically converted to double num1 = 78.2; int num2 = (double) num1