Java Class getAnnotation() MethodThe getAnnotation() method of java Class class returns this element's annotation for the specified type if such an annotation is present, otherwise returns the null. SyntaxParameterA - the type of the annotation to query for and return if present ReturnsThis element's annotation for the specified type if such an annotation is present, else return null. ThrowsNullPointerException Example 1Test it NowOutput: Demo_Annotation 100 Next TopicJava Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India