how to check what type an object is java code example
Example: how to check object type in java
// obj instanceof Class
/*example*/
String str = "a String made by the String class";
if(str instanceof String) System.out.println("This is True");
if(str instanceof float) System.out.println("This will never be on your screen");
// You can do this with any type of class you want!