Javatpoint Logo
Javatpoint Logo

Java Method getParameterTypes() Method

The getParameterTypes () method of Method class returns an array of type class objects representing the formal parameter types, in the order in which they are declared. If the underlying executable takes no parameter, then an array of length 0 is returned.

Syntax

Parameter

NA

Returns

The parameter types for the executable this object represents

Throw

NA

Example 1

Test it Now

Output:

int
class java.lang.String
class [Ljava.lang.String;

Example 2

Test it Now

Output:

Int    //output representing the type of parameters
int
double
class java.lang.String
Next TopicJava Method Class





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