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