package com.frank.app;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
import java.net.URLEncoder;
import java.util.LinkedList;
import java.util.List;
public class App {
private static <T> List<T> demo1(Class<T> clazz) {
T obj = null;
try {
obj = clazz.newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
List<T> result = new LinkedList<T>();
result.add(obj);
return result;
}
public static void main(String[] args) {
List<String> list = demo1(String.class);
System.out.println(list);
}
}