Java Method invoke() MethodThe invoke () method of Method class Invokes the underlying method represented by this Method object, on the specified object with the specified parameters. Individual parameters automatically to match primitive formal parameters. Both primitive and reference parameters are subject to method invocation conversions as necessary. SyntaxParameterobj - the object the underlying method is invoked from args - the arguments used for the method call ReturnsThe result of dispatching the method represented by this object on obj with parameters args. ThrowIllegalAccessException IllegalArgumentException InvocationTargetException NullPointerException ExceptionInInitializerError - Example 1Test it NowOutput: processing test null
Next TopicisBridge() Method
|