Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的问题中,我参考了第三版中的 Java 语言规范。根据交集类型的规范(第 4.9 节),交集类型int[](或int[] & int[])将具有与具有空主体和直接超类的类类型相同的成员int[]。但是按照我理解规范的方式,类类型可能没有数组类型作为超类型,因为§8 告诉:
int[]
int[] & int[]
除了 Object 之外的每个类都是单个现有类(第 8.1.4 节)的扩展(即子类),并且可以实现接口(第 8.1.5 节)。
我是否理解错误或规范不一致?