Java - Type Casting & AutoBoxing , AutoUnboxing
Type Casting:
Converting values from one data
type to another data type is called as type casting.
Eg
double calculatedMark = 87.6;
int finalGrade = (int)calculatedMark;
·
Auto Boxing
- Converting primitive data type into Wrapper classes
·
Auto Un-boxing
- Converting Wrapper class into primitive data type.
Usage : No need to create any
type casting
Comments
Post a Comment