In Java, primitive data types can be categorized within three types:
A primitive data value can't act as an object in a Java program unless wrapped. Therefore, each primitive data type has a corresponding wrapper class that can be used to represent its value as an object.
- Integral types:
- signed integers : byte,short,int and long.
- unsigned character values, char,denoting all the 65536 characters in the 16-bit Unicode character set.
- Floating-point types: float and double, representing fractional signed numbers.
- Boolean type: boolean, representing logical values, the two literals, true or false.
A primitive data value can't act as an object in a Java program unless wrapped. Therefore, each primitive data type has a corresponding wrapper class that can be used to represent its value as an object.
No comments:
Post a Comment