In the main method of a class (or any static method), how can I find out what class I am in?
Created May 4, 2012
John Mitchell
To get the Class object associated with that class, you have to reference the name of the class directly and use the .class keyword. I.e., if your class is named Foo use Foo.class to get the Class object for Foo.