Primitive Data Types in Java
अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!
double
8 bytes - Stores fractional numbers. Sufficient for storing 15 decimal digits.
long
8 bytes - stores whole numbers from about -9.2 quintillion to 9.2 quintillion
boolean
1 bit - Stores true or false values
byte
1 byte - stores whole numbers from -128 to 127
char
2 bytes - Stores a single character/letter or ASCII values.
short
2 bytes - stores whole numbers from about -32k to 32k
float
4 bytes - Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits
int
4 bytes - stores whole numbers from about -2.1 billion to 2.1 billion