aspose file tools*
The moose likes Java in General and the fly likes What is class class... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is class class..." Watch "What is class class..." New topic
Author

What is class class...

kashif hameed
Greenhorn

Joined: Jun 15, 2003
Posts: 15
hi,
Dear grat java fellows,I have a problum.What is class class ,I think a polite person in which must be explain thsi!
Kashif Hameed!
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is class class...