package com.srie.testjava; import java.util.ArrayList; import java.util.List; public class TestGenerics { public static void main(String[] args) { List<Object> o = new ArrayList<Object>(); List<String> s = new ArrayList<String>(); System.out.println(o); System.out.println(s); /** * 反编译之后的结果,显示了类型擦除的情况; * List o = new ArrayList(); * List s = new ArrayList(); * System.out.println(o); * System.out.println(s); */ } }