Javatpoint Logo
Javatpoint Logo

Java Method invoke() Method

The 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.

Syntax

Parameter

obj - the object the underlying method is invoked from

args - the arguments used for the method call

Returns

The result of dispatching the method represented by this object on obj with parameters args.

Throw

IllegalAccessException

IllegalArgumentException

InvocationTargetException

NullPointerException

ExceptionInInitializerError -

Example 1

Test it Now

Output:

processing test
null
Next TopicisBridge() Method





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA