Why wont this assignment work?

前端 未结 5 1945
慢半拍i
慢半拍i 2021-01-28 00:04

I\'ve got a class Results which extends ArrayList. I\'ve got an object i which has a function i.getResults() w

5条回答
  •  抹茶落季
    2021-01-28 00:31

    You're assigning a parent to the child class. This is not possible. You can assign do

    ArrayList list = new Results();
    

提交回复
热议问题