get class of t java code example
Example 1: getting class name in java
a.getClass().getName();
Example 2: java get classname
//Just the name of the class
myObject.getClass().getSimpleName();
//The name of the class with the package name
myObject.getClass().getName();
Example 3: java get class name of object
myObject.getClass().getName()