Data type in java can be of 8 basic type and these data types are called as primitive data types. The Following table contains the primitive data types.
Data Type | Size | Description |
Boolean | 1 Bit | Can be either true or false |
Char | 16 Bits | Can be single character enclosed with single ‘. |
Byte | 8 Bits | Integers between -128 to 12 |
Short | 16 Bits | Integers between -32768 to 32767 |
Int | 32 Bits | Integers between -2147483648 to 2147483647 |
Long | 64 Bits | Integers between -9223372036854775808 to 9223372036854775807 |
Float | 32 Bits | Single precision numbers in the range 3.4e-38 to 3.4e38 |
Double | 64 Bits | Double precision number in the range from 1.7e-308 to 1.7e308 |
No comments:
Post a Comment