Calling ambiguously overloaded constructor in Java
问题 I just saw this C# question and wondered, if something similar could happen in Java. It can, with class A<T> { A(Integer o) {...} A(T o) {...} } the call new A<Integer>(43); is ambiguous and I see no way how to resolve it. Is there any? 回答1: Yes, members of a parameterized type JLS3#4.5.2 can end up in conflicts that are precluded in a normal class declaration(#8.4.8). It's pretty easy to come up with many examples of this kind. And in Java, neither constructor in your example is more