This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Calling static methods using Reflection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calling static methods using Reflection" Watch "Calling static methods using Reflection" New topic
Author

Calling static methods using Reflection

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
How do I call a static method using Reflection
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
In Method.invoke(), just pass null instead of an instance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling static methods using Reflection
 
Similar Threads
How to locate a class without knowing its package
Anonymous class doubt
dynamically set data via setters at run time
Calling Superclass version of an Overridden Method
Finding field defined in parent class