Try this :
Java classes have static instance of their own class (java.lang.Class type).
That means if we have a class named Main.
Then we can get its class instance by
Main.class
If you're interested in name only then,
String className = Main.class.getName();