类型擦除后,不允许类有两个重载方法可以具有相同的签名.
class Box { //Compiler error //Erasure of method print(List) //is the same as another method in type Box public void print(List stringList) { } public void print(List integerList) { }}
类型擦除后,不允许类有两个重载方法可以具有相同的签名.
class Box { //Compiler error //Erasure of method print(List) //is the same as another method in type Box public void print(List stringList) { } public void print(List integerList) { }}