Data type is nothing but the type of the data. Each Variable in Java must have certain type associated with it which tells us what kind of data a variable can store.
Data Types in Java Programming Language are classified into two main groups – Primitive and Reference Data Types.
A primitive Data Types are :
- Data types are predefined by the Java language.
- Predefined data types are Reserved keyword so we cannot use them as variable name inside program/application
- Primitive values do not share state with other primitive values.
- Total Number of Primitive Data Types in Java Programming is 8
- All Primitive Data Types have respective Wrapper Classes i.e Integer is wrapper class for primitive type int
Primitive Data Types are –
Primitive Data Types in Java : | | | |
boolean | char | byte | int |
short | long | float | double |
Classification of Data Types in Java Programming Language
Data Type and Other Details
Type | Contains | Default | Size |
boolean | true or false | false | 1 bit |
char | Unicode Character | u0000 | 16 bits |
byte | Signed Integer | 0 | 8 bits |
short | Signed Integer | 0 | 16 bits |
int | Signed Integer | 0 | 32 bits |
long | Signed Integer | 0 | 64 bits |
float | Floating Number | 0.0 | 32 bit |
double | Floating Number | 0.0 | 64 bit |
This data is magnificent. I am impressed with your writing style and how properly you define this topic. After studying your post, my understanding has improved substantially. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
ReplyDeleteJAVA Training|Best JAVA Training institute in Chennai
Hello admin. This information is really useful.
ReplyDeleteRegards,
Spring Training in Chennai | Hibernate Training in Chennai | Struts Training in Chennai
Really informative Post thanks for the sharing.
ReplyDeleteSAP HR Training Course in gurgaon