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

Popular posts from this blog

How to set Java Object into JaxBElement ?

GitLab