TypeVariable: getName() : TypeVariable « java.lang.reflect « Java by API






TypeVariable: getName()

import java.lang.reflect.TypeVariable;
import java.util.List;

public class MainClass {
  public static void main(String args[]) throws Exception {

    TypeVariable[] tv = List.class.getTypeParameters();
    System.out.println(tv[0].getName()); 

  }
}
           
       








Related examples in the same category