Data Types in Java
Here we discuss about Data Type in Java or Datatype in Java in detail.
Java provides standard data types to store information. Java is a richly typed language which gives the programmer a wide variety of data types to use.
Data type specifies the size and type of values that can be stored in an identifier.
Data types in Java are classified into two types:
Primitive
Which include Integer, Character, Boolean, and Floating Point.
Non-primitive
Which include Classes, Interfaces, and Arrays.
Data Type in Java
Data Type | Default Value | Default size |
---|---|---|
boolean | false | 1 bit |
char | '\u0000' | 2 byte |
byte | 0 | 1 byte |
short | 0 | 4 byte |
int | 0 | 4 byte |
long | 0L | 8 byte |
float | 0.0f | 4 byte |
double | 0.0d | 8 byte |
It is really a great work and the way in which u r sharing the knowledge is excellent.Thanks a lot! You made a new blog entry to answer my question; I really appreciate your time and effort.
ReplyDeletejava training in chennai |
java training institutes in chennai