Javatpoint Logo
Javatpoint Logo

Java Method getParameterAnnotations () Method

The getParameterAnnotations () method of Method class returns an array of arrays of Annotations that represent the annotations on the formal parameters, in declaration order, of the Executable represented by this object. An array of length Zero will be returned if has no parameters is passed.

Syntax

Parameter

No parameter is passed.

Returns

An array of arrays representing the annotations on the formal and implicit.

Throw

NA

Example 1

Test it Now

Output:

[[@ReflectMethodgetParameterAnnotationsExample1$DisplayConf()], 
[@java.lang.Deprecated(), @ReflectMethodgetParameterAnnotationsExample1$INDEX()]]
@ReflectMethodgetParameterAnnotationsExample1$DisplayConf()
@java.lang.Deprecated()
@ReflectMethodgetParameterAnnotationsExample1$INDEX()

Example 2

Test it Now

Output:

[[Ljava.lang.annotation.Annotation;@677327b6]
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