有一个方法这样写是正确的:publicstaticList>function(){
List>list=newArrayList
>();
returnlist;}但是以下会报错:publicstaticList>function(){
List>list=newArrayList
>();//报错 returnlist;}以下也报错:publicstaticList>function(){
ArrayList>list=newArrayList >(); returnlist;//报错}List接口和ArrayList的实现如何理解?
LEATH
梦里花落0921
相关分类