Compile error when providing interface as an arraylist type

前端 未结 3 1515
一向
一向 2020-12-21 07:14

I have an interface defined as

interface ListItem {
    public String toString();
    public String getUUID();
}

And a class (Browse

3条回答
  •  一向
    一向 (楼主)
    2020-12-21 07:44

    ArrayList is not equal to ArrayList

    They are strictly type safe

    you can make use of ?

提交回复
热议问题