Java Class getGenericInterfaces() MethodThe getField() method of java Class class returns the Types as an array of the type Type representing the interfaces directly implemented by the class or interface. SyntaxParameterNA ReturnsAn array. ThrowsGenericSignatureFormatError, TypeNotPresentException MalformedParameterizedTypeException Example 1Test it NowOutput: No interfaces impleamented... Example 2Test it NowOutput: [Ljava.lang.reflect.Type;@7852e922 type is ParameterizedType printing each one of ActualTypeArguments: ---- type is Class class name: String type is Class class name: BigInteger ---- 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