import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
public class CreateATypeSpecificList {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
List<Integer> intlist = new ArrayList<Integer>();
intlist.add(new Integer(123));
List<Number> numlist = new ArrayList<Number>();
numlist.add(new Integer(123));
numlist.add(new Float(123));
intlist.add(null);
List<URL> urlList = new ArrayList<URL>();
try {
urlList.add(new URL("https://www.baidu.com"));
} catch (MalformedURLException e) {
}
String s = urlList.get(0).getHost();
}
}