Java Class isAnnotation() MethodThe isAnnotation() method of java Class class returns true if this Class object represents an annotation type. Here, we must notice that if this method returns true, isInterface() would also return true, as all annotation types are also interfaces. SyntaxParameterNA Returnstrue, if this class object represents an annotation type; false otherwise. ThrowsNA Example 1Test it NowOutput: Check isAnnotation ::: true Check isInterface ::: true Example 2Test it NowOutput: Check isAnnotation ::: false Check isInterface ::: 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