Javatpoint Logo
Javatpoint Logo

Java Class getAnnotatedInterfaces() Method

The getAnnotatedInterfaces() method of java Class class returns an array of the objects of the type AnnotatedType that represents the use of types to specify superinterfaces of the entity represented by this(Current class object) Class object.

Syntax

Parameter

No parameter is passed.

Returns

An array representing the super interfaces

Throws

Does not throw any Exception.

Example 1

Test it Now

Output:

Anotated Type :interface java.io.Serializable
Annotations     :[]
Declared Annotations     :[]

Example 2

Test it Now

Output:

Annotated Type :interface java.io.Serializable
---------------------------------------------------------------------
Annotations :[@ClassgetAnnotatedInterfaceExample2$FileSystem()]
Declared Annotation :[@ClassgetAnnotatedInterfaceExample2$FileSystem()]

Next TopicJava 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