previous | start | next

## Invoking a Method

- Supply implicit parameter (`null` for static methods)
- Supply array of explicit parameter values
- Wrap primitive types
- Unwrap primitive return value
- Example: Call `System.out.println("Hello, World")` the hard way.

      Method m = PrintStream.class.getDeclaredMethod(

         "println",

         new Class[] { String.class } );

      m.invoke(System.out,

         new Object[] { "Hello, World!" });

previous | start | next