Online Java Compiler By
JavaTpoint.com
//import statements import java.lang.reflect.*; import java.util.ArrayList; public class ClassgetGenericSuperClassExample1 { public static void main(String args[]) { Type tp = Integer1.class.getGenericSuperclass(); System.out.println(tp); ParameterizedType pt = (ParameterizedType)tp; System.out.println(pt.getActualTypeArguments()[0]); } } class Integer1 extends ArrayList
{ public Integer1() { } }
Output