Java TypeVariable.getName()
Syntax
TypeVariable.getName() has the following syntax.
String getName()
Example
In the following code shows how to use TypeVariable.getName() method.
//from ww w. j av a2 s . c om
import java.lang.reflect.TypeVariable;
import java.util.List;
public class Main {
public static void main(String args[]) throws Exception {
TypeVariable[] tv = List.class.getTypeParameters();
System.out.println(tv[0].getName());
}
}