一个类不允许有两个重载方法,可以在类型擦除后使用相同的签名。
class Box  {
   //Compiler error
   //Erasure of method print(List<String>) 
   //is the same as another method in type Box
   public void print(List<String> stringList) { }
   public void print(List<Integer> integerList) { }
}
					
						上一篇:
								Java泛型不能使用异常
												下一篇:无
												
						
						
					
					
					