Is there any benefit in implementing a interface in a subclass even though the superclass implements the same interface

前端 未结 6 1482
醉酒成梦
醉酒成梦 2021-01-12 05:29

When I was seeing the declaration of ArrayList

class ArrayList extends AbstractList
    implements List, RandomAccess         


        
6条回答
  •  执笔经年
    2021-01-12 05:59

    Totally unnecessary. I wouldn't do it at all.

    It's unclear why they did that by then. But by now apparently it's a mistake, since everybody is surprised by it when they first notice this odd redundancy.

提交回复
热议问题