COMPLETE SOURCE CODE FOR : GetClassNameFromClassObject.java
*****************************************************************
public class GetClassNameFromClassObject
{
public static void main(String[]args)
{
try
{
//For example of this source code, we will use java predefined class named Object
//You can change class name instead of java.lang.Object
Class a=Class.forName("java.lang.Object");
//Now we will print the name of the class
System.out.println("IT'S NAME IS : "+a.getSimpleName());
}
catch(Exception exception)
{
exception.printStackTrace();
}
}
}
*****************************************************************
JUST COMPILE AND EXECUTE IT
*****************************************************************