Not implementing all the methods of an interface
I tried reproducing the code below on eclipse. I get an error telling me that I have to implement all the inherited methods (because Comparator is an interface). The type new Comparator(){} must implement the inherited abstract method Comparator.reversed() . There are many of these methods and the only one I want to overwrite is compare. Do I have to implement all the other methods or is there a way to specify I don't need to implement them? I understand that I will have to do it because of the contractual nature of an interface, but what if I just need to change one method? static Map