List vs ArrayList

后端 未结 6 556
春和景丽
春和景丽 2021-01-23 20:31
List> listeners = new List>();

Why the line above fails with:

Cannot in

6条回答
  •  闹比i
    闹比i (楼主)
    2021-01-23 20:45

    List is an interface, you can't instantiate an interface.

提交回复
热议问题