how to know type of variable in 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()