One, the data type
There are three types of Java data
1, the basic data types (8) :
Byte type
Represents an integer
Scope: - 128-127
The memory space: 1 byte (1 b) - "eight (8 position,
Put eight digital)
Short
Represents an integer
Scope: - 32768-32767
Memory: 2 bytes=="16
Int
Represents an integer
Scope: - 2147483648-2147483647=="about 2.1 billion
Memory space: 4 bytes==="32-bit
Long
Represents an integer
Scope:
Memory: 8 bytes===64
"Float
A decimal floating-point said single precision
Storage:
Computer internal use scientific notation decimal representation
Total takes 32-bit space namely 4 bytes
1: the sign bit (0 indicates positive and 1 negative)
Eight: the index of a few power (10) control of the float
The size range of
23: the mantissa bits (namely 7.0.x.x xx) control the precision of the float
The scope of
Double
A decimal floating-point said double
Storage:
Int a=222;//decimal int b=023; C=0 x1f////octal int hexadecimal
Computer internal use scientific notation decimal representation
Takes 64 space namely eight bytes
1: the sign bit (0 indicates positive and 1 negative)
11: the index of a few power (10) to control the
Double the size range of
52: mantissa bits (namely 7.0.x.x xx) to control the double fine
Degree
Boolean
Boolean type, say true or false
Only two values, true, false
Char
To any one character at a time, can be a Chinese characters
Statement: char c='x'
Special assignment way: can be a Unicode value
2, the reference type
In addition to basic data types and type of all data types
3, empty type
Null is all the default values of the variables of reference type
Two, the operator
1, the arithmetic operators: + - */%
2, the equivalent operator:==,!=
3, the comparison operators: & gt; <>=& lt;=
4, logical operators: & amp; &
5, since the increase, the decrement operator: i++ + + I - I - I