Therefore, by assigning different data types to variables, we can store various data types in these variables.
The following table gives the detail information about Primitive Data Types:
Primitive Data Types (Table)
| DataType | Default Value | Size | Type |
|---|---|---|---|
| byte | 0 | 1 byte | Integral Value |
| short | 0 | 2 byte | Integral Value |
| int | 0 | 4 byte | Integral Value |
| long | 0L | 8 byte | Integral Value |
| float | 0.0f | 4 byte | Floating Point |
| double | 0.0d | 8 byte | Floating Point |
| char | '\u0000' | 2 byte | Character |
| boolean | false | 1 bit | Boolean |
0 comments:
Post a Comment
Comment Here