Java Class isAnnotationPresent() MethodThe isAnnotationPresent() method of java Class class returns true if an annotation for the specified type is present on this element, false otherwise. SyntaxParameterannotationClass - the Class object corresponding to the annotation type Returnstrue if an annotation for the specified annotation type is present on this element. ThrowsNullPointerException Example 1Test it NowOutput: Check isAnnotationPresent ::: false Example 2Test it NowOutput: Check isAnnotationPresent ::: true 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