Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thank you. This really is a nice way to use for my own classes. But I was hoping to find something more generic, in case I don't control the classes. Commented Jan 27, 2009 at 10:36
  • 4
    You're confusing class loading and initialization. When you do something like Object o = ClassToTest.class; then the class gets loaded but not initialized. I guess, the OP doesn't care; just wanted to get it straight. Commented Sep 10, 2014 at 17:02