Scope of java Basic Data Types
System. out. println ("BYTE MAX_VALUE =" + Byte. MAX_VALUE); System. out. println ("BYTE MIN_VALUE =" + Byte. MIN_VALUE); System. out. println ("SHORT MAX_VALUE =" + Short. MAX_VALUE); // more than 30 thousand characters, 5-bit System. out. println ("SHORT MIN_VALUR =" + Short. MIN_VALUE); System. out. println ("Int MAX_VALUE =" + Integer. MAX_VALUE); // 2.1 billion, 10-bit System. out. println ("Int MIN_VALUE =" + Integer. MIN_VALUE); System. out. println ("LONG MAX_VALUE =" + Long. MAX_VALUE); // 9 ..., 19-bit System. out. println ("LONG MIN_VALUR =" + Long. MIN_VALUE); System. out. println ("FLOAT MAX_VALUE =" + Float. MAX_VALUE); System. out. println ("FLOAT MIN_VALUE =" + Float. MIN_VALUE); System. out. println ("DOUBLE MAX_VALUE =" + Double. MAX_VALUE); System. out. println ("DOUBLE MIN_VALUR =" + Double. MIN_VALUE );
|
Basic Type |
Boolean |
Byte |
Char |
Short |
Int |
Long |
Float |
Double |
Void |
|
Binary digits |
1 |
8 |
16 |
16 |
32 |
64 |
32 |
64 |
-- |
|
Package class |
Boolean |
Byte |
Character |
Short |
Integer |
Long |
Float |
Double |
Void |
Float and double in java conform to the IEEE754 standard, and only the accuracy is output here.
The problem to be solved,
1. Why is the max index smaller than the absolute value of the min index?
2. What type of storage is used in the range of boolean, and type conversion occurs During computation?
3. What data types need to be converted during calculation in a virtual machine?