String className = this. getClass(). getSimpleName(); This will work as long as you don’t use it in a static method.18 Kas 2011
How do you return a class name from a String in Java?
String className = this. getClass(). getSimpleName(); This will work as long as you don’t use it in a static method.18 Kas 2011