The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Class object holds information about the class.

Posted by Kishori Sharan on January 17, 2002 at 9:29 AM

What do you mean by loading a class? When a class is loaded in memory then JVM simply stores all information contained in class in memory. But, the question is how all the information about class is stores. To store all pieces of information about a class you need a struture which can hold all such info. Java has a class named Class (Note upper case "C" in the name) which is designed to hold information about a class. So, when a class is loaded in memory an object of class "Class" is created and all infor is stores in that object. I don't know in what context you have heard about class object. My explnation may be completely out of context. I just guessed you may be looking for info about class Class. Class class also lets you know about a Class methods, indtance variables etc. You use getClass method on an object to get the Class object for that particular object.



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us