get class of instance java code example Example: java get class name of object myObject.getClass().getName()