How to reproduce java compile/runtime error for generic interface type variables that may not be a subtype of two param interfaces at same time?
问题 I was reading the Java SE 6 specs and then found some confusing stuff that a I can't reproduce: A type variable may not at the same time be a subtype of two interface types which are different parameterizations of the same generic interface. I wrote the following code: interface Odd {} interface Even {} interface Strange extends Odd, Even {} interface InterfaceOne<O extends Odd, E extends Even> {} interface InterfaceTwo<O extends Odd, E extends Even> extends Odd, Even {} public class Test {