As a SDE aspirant, since i am building by Basics and aiming for Big MNCs,I always forget about the size and default values of Data Types...we often overlook this topic but it is as important as everything else,Therefore:
Today's Topic is Default Types->
When a variable is declared but not initialized, it is assigned a default value based on its data type.
The default values for the primitive data types in Java are as follows:
byte: 0
short: 0
int: 0
long: 0L
float: 0.0f
double: 0.0d
char: '\u0000' (null character)
boolean: false
Sizes of default data types

Top comments (0)