This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by faisal usmani: Hello ranchers ,
What is Class Object or meta-class , what is it's use , how do we define it ?
Thanx in advance
A Class object is used to represent a class. With it, you can get information about a class, instantiate an object of that class, invoke methods, etc.
If you have an instance, you can get the Class object via the getClass() method. If you know the name of a particular class -- say MyClass -- you can get the Class object via MyClass.class. And you can also directly load the class -- and get a Class object -- from the class loader via the forName() method.