Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Class Object

 
faisal usmani
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21381
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
faisal usmani
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx sir ,


I got the point .



regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic