This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java in General and the fly likes The 'Class' and 'Method' classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "The Watch "The New topic

The 'Class' and 'Method' classes

Chandra Kaye

Joined: Mar 04, 2003
Posts: 3
Hi all,
I dont know whether this has to go in the beginners/indermediate/advanced. I would like to know when and why anyone would need to use the above two classes?? Method class objects represents methods of an object. We can use the invoke() method of the Method class object to invoke the method represnted by the Method object on some other object. Since the same functions can be performed by just creating objects and calling their methods through the object_name.method() format, why do we really need these classes??
Thanks in advance.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Greetings Chandra,
Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here but we do have one. Please change your display name to conform with the JavaRanch naming policy of a real first and last name.

I dont know whether this has to go in the beginners/indermediate/advanced.

It can be tough sometimes to decide, but we discourage multiple posts of the same topic. So in the future, please choose one forum and post there.
Since you have this posted in the Begginers forum, I'm going to lock this one and refer repliers to The 'Class' and 'Method' classes .

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
I agree. Here's the link:
subject: The 'Class' and 'Method' classes
It's not a secret anymore!