Java Class getGenericSuperClass() MethodThe getGenericSuperClass() method of java Class class returns the Type representing the direct superclass of the class, interface, primitive type or void represented by this Class. SyntaxParameterDoes not take the parameter. Returnsthe direct superclass of the class represented by this object. ThrowsGenericSignatureFormatError TypeNotPresentException MalformedParameterizedTypeException Example 1Test it NowOutput: java.util.ArrayList<java.lang.Integer> class java.lang.Integer Example 2Test it NowOutput: java.util.ArrayList<java.lang.Float> class java.lang.Float ------------------------------------------------------ java.util.ArrayList<java.lang.String> class java.lang.String 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