This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The 'Class' and 'Method' classes  RSS feed

 
Chandra Kaye
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Regards
Chandra
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandra KKKK,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at The Reflection Trail of Sun's Java Tutorial.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!