File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What is Class Object  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is Class Object  " Watch "What is Class Object  " New topic
Author

What is Class Object

faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
Hello ranchers ,

What is Class Object or meta-class , what is it's use , how do we define it ?



Thanx in advance

[ February 26, 2006: Message edited by: faisal usmani ]
[ February 26, 2006: Message edited by: faisal usmani ]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18120
    
  39

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.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
Thanx sir ,


I got the point .



regards
 
Don't get me started about those stupid light bulbs.
 
subject: What is Class Object
 
Similar Threads
How to deploy a servlet in JBOSS using GEL?
Size of a Class.
How does System.out.println (Works)
static final methods
Exception on calling wait() method of Object class(WHY)