In Java, java.lang.reflect.*; package is required to import in the program to invoke the methods. As you can see here we are using reflect method, this could be either a class method or instance method and the usage of methods in Java is to access a single method either on class or interface. This example will show you, how to declare and invoke the methods in Java.
Code for Java Method - Invoke
Output will be displayed as:
Posted on: November 15, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles