how to get the type of a variable java code example
Example 1: get type of variable java
((Object) myVar).getClass().getName()
//OR
((Object) myInt).getClass().getSimpleName()
Example 2: get type java
a.getClass().getName()
((Object) myVar).getClass().getName()
//OR
((Object) myInt).getClass().getSimpleName()
a.getClass().getName()