Let x be a given object of primitive type, e.g. x is defined by int x;
or char x;
or ....etc.
Then, how to get name of class (i.e., int
or char
or ...etc) from x
?
Motivation:
if(primitive type of x = int) then ....
if(primitive type of x = char) then ....