Why LinkedList and arraylist extends AbstractList in java?

后端 未结 4 1367
一个人的身影
一个人的身影 2021-02-13 18:41

Why LinkedList and ArrayList extends AbstractList in Java?

Abstract classes are used when we want to specify a common beh

4条回答
  •  别跟我提以往
    2021-02-13 19:02

    Not all methods from AbstractList are overridden. Remember that AbstractList subclasses AbstractCollection, which defines methods like containsAll or toString which are not overridden by either ArrayList nor LinkedList.

提交回复
热议问题