The classification of constants in Java:
1. Integer constants, 2. Decimal constant 3. Boolean constant 4. Character constants (denoted by single quotation marks, should be able to have one character) 5. String constants (in double quotes, represented by multiple characters) 5.null constants
Computer history: At the very beginning, the computer describes data by means of electrical signals. A set of 8 electrical signals (8 bits), which is a unit, called the byte (smallest unit of computer-byte)
Decimal to binary: is constantly divided by 2, take the remainder, and then the remainder from the bottom up to write, OK. The binary of 6 is 110
Binary to decimal: is multiplied by the power of 2, the binary 110, converted to a decimal: 0*2 (0) +1*2 (1) +1*2 (2) = 6 from right to left, and power is incremented sequentially
Octal: Front plus 0----0125
Hex: 0x in front,----0x55
Negative number binary: is positive binary negation +1 (00000001), negative binary highest bit is 1; bits are 1, the corresponding decimal is-1.
Java Fundamentals 4