A variable of an interface type can hold a null reference or a reference to any
instance of any class that implements the interface.
Note that a variable is not guaranteed to always refer to a subtype of its declared type, but
only to subclasses or subinterfaces of the declared type. This is due to the possibility of
heap pollution discussed below.------The Java™ Language Specification Java SE 7 Edition 第4章 4.12.2请问上面讲到的subtype 跟subclass,subinterface分别指的是什么?
instance of any class that implements the interface.
Note that a variable is not guaranteed to always refer to a subtype of its declared type, but
only to subclasses or subinterfaces of the declared type. This is due to the possibility of
heap pollution discussed below.------The Java™ Language Specification Java SE 7 Edition 第4章 4.12.2请问上面讲到的subtype 跟subclass,subinterface分别指的是什么?
假设有类定义 :class A<T>{}那么下面的调用:
A<Integer> a=new A<>();其中变量 a 的type是 A<Integer>,a的class 是 A,这样理解对吗?