Javatpoint Logo
Javatpoint Logo

Java Method getTypeParameters() Method

The getTypeParameters () method of Method class returns an array of type TypeVariable objects that represent the type of variables declared by the generic declaration represented by this Generic Declaration object, in the same order in which declared. If underlying generic declares no type variable, then an array of length 0 is returned.

Syntax

Parameter

No parameter is passed.

Returns

the array of TypeVariable objects representing the type variables declared by this generic declaration

Throw

GenericSignatureFormatError

Example 1

Test it Now

Output:

[Ljava.lang.reflect.TypeVariable;@7852e922

Example 2

Test it Now

Output:

Type variable for Method Name getMethodX is N
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