How to determine if Object is Integer? Something like:
if (obj.isInteger()) {...}
if(ob instanceof Integer) { your code/logic here}
if (obj instanceof Integer) {....}
You may use Class.isInstance() method - This method is the dynamic equivalent of the Java language instanceof operator.
dynamic
instanceof