Why would both a parent and child class implement the same interface?

后端 未结 4 1910
梦谈多话
梦谈多话 2020-11-28 09:45

I inherited some legacy Java (1.4) code and this design decision appears regularly. I can\'t understand if there\'s any purpose or reason to it.

public inter         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 10:27

    It is nonsense, don't do it.

    Especially in a public API like java collections. It's absolutely nonsense.

提交回复
热议问题