1. Constants
Null and other Special
2. Identifiers
Numbers-letters-underscores, numbers cannot start
3. Binary
1> binary calculation method.
2> is commonly used in binary.
1 1 0 0 1 1 0
128 64 32 18 8 4 2
4. Binary conversion
1> octal: Three binary consists of an octal bit. Starting with 0 means 032 means octal.
Hex: Four bits make up a 16 binary bit. The start is in 0x, and 0x represents hexadecimal.
Why is there no 32 binary?
Because the system is meant to represent data convenience, it is not used to indicate that the data is complex. The range of 16 binary representation numbers is 0-9,a-f.
And 32 is 0-9,a-w, that is, the data is not very convenient.
Calculation of 2> Binary
4+5 = 9
100
+ 101
——————————————————
10 01 = 9
3>
* Number of representations in memory 4+5
0000 0000 0000 0000 0000 0000 0000 0100
0000 0000 0000 0000 0000 0000 0000 0101
-------------------------------------------------------------------------
0000 0000 0000 0000 0000 0000 0000 1001
*4-5 in-Memory representation:
0000 0000 0000 0000 0000 0000 0000 0100
1111 1111 1111 1111 1111 1111 1111 1100
-------------------------------------------------------------------------
10000 0000 0000 0000 0000 0000 0000 0000
Note:
6 of the original code is 00000110
6 's inverse code is 11111001.
Negative number after code +1
11111010
This is-6
Naming conventions in 5.java:
Package name to lowercase
Class name Leiming hump name, first letter capitalized.
Method Name: First letter lowercase, followed by uppercase letters. SetData ();
Constant: Max_count
Java Foundation Bi Xiangdong day02