What is Data Type in Java?

Data types are keywords. But every keywords are not data type. Data types are keywords which specify the nature of data or type of the data. Data type are also used to specify the size of data. Keywords mean some english alphabets which have predefine meaning in Java.

Data Types are two types

1. Primitive Data Types:

Primitive data are the data types which allow to store single value. Primitive types are the most basic data types available within the Java language. It is also called primitive data type and primitive data types have first priority.

In Java we have 8 Data Type.

Data Type Size(bytes)
byte 0
short 0
int 0
long 0L
float 0.0f
double 0.0d
char 'u\000'
String(or any object) null
boolean false








String(or any objec)

Advertisement here

Share this Page.