Why is it not necessary to override both methods of interface Comparator in Java

前端 未结 3 518
别那么骄傲
别那么骄傲 2021-02-09 22:17

We know that it is necessary to implement all methods of an interface, if we want to make an object of that class. But why is it not necessary to implement both the methods

3条回答
  •  迷失自我
    2021-02-09 23:01

    Because it is already overridden by java.lang.Object on every object you can create.

提交回复
热议问题