Just looking Java Collections and I see the List interface, which extends the Collection interface, also contains the exact same method signatures in the Collection interface -- but not all of them just a subset. My question is why? Since it extends it, we know it will inherit them all by default. And why a subset?
The same can be seen with the Deque extending the Queue, containing all the method signatures of the Queue. Doesn't this make it harder to know what's unique about that interface?
Here is a simple example of the above:
public interface A {
void someMethod();
}
public interface B extends A {
void someMethod(); // why make this explicit?
void anotherMethod();
}
