This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
The Class class (did you hear an echo?) is mainly used for the java reflection API. If you know the Class of an object you can learn practically everything about its class: fields, methods, constructors, etc. It also has a couple of handy methods, getResource() and getResourceAsStream(), which return URL and InputStream respectively. Those are very usefull when you have a resource in the same jar file as the object of the particular Class. You will no doubt eventually see code like:
That static method causes the ClassLoader to dynamically load the class com.mywww.DBDriver, provided of course it can locate it.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher