What is java primitive data types

Data types are used to represent type of the variable & expressions.
Representing how much memory is allocated for variable.
Specifies range value of the variable.

There are 8 primitive data types in java
Data Typesize(in bytes)Rangedefault values
byte1 -128 to 1270
short 2-327680
int 4-2147483648  to 2147483647 0
long89,223,372,036,854,775,808 to 9 ,223,372,036,854,775,807 
float 4-3.4e38 to 3.4e 0.0
double 8-1.7e308 to 1.7e308 0.0
char 20 to  6553single space
Boolean no-size no-rangefalse

Published by Atul maurya

i am student of computer science & engineering .i want to become a java developer. my hobby is to learn programming language in easy way.

Leave a comment

Design a site like this with WordPress.com
Get started