Tag Archives: data type

2 Comments

Java programming language support these primitive data types:

1. Byte : It is equals to 8 bits

2. Short : (16 bits equals to two bytes)

3. Int : (32 bits equals to 4 bytes)

4. Long : (64 bits equals to 8 bytes)

5. Boolean : Has to possible values either True or False

6. Char :Store a single char

7. Float : (32 bits equals to 4 bytes)

8. Double : (64 bits equals to 8 bytes)

All these data types considered as reserved keywords pre defined by programming languageĀ  . Primitive values cannot share its state with other primitive values. primitive data types are not object that why we do not use new keyword. There are default values for above types are:

default values

 

primitive data types

primitive data types