get class of object java code example
Example 1: java get class name of object
myObject.getClass().getName()
Example 2: how to find the class of an object 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");