Data Types 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.

What is data type in Java?

How many types of data types in java?

Data types are two types in java.

Primitive data types

Primitive data types are the data types which allow to store single value. Primitive data types are the most basic data types available within the Java language. Primitive data types have first priority.

In Java we have 8 data types.

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

byte

short

int

long

float

double

char

String(or any objec)

Post Your Comment