3 ms·
In Java, you can have: class Set<A> { public Set<A> union(Collection<A> c) { ... } } class SortedSet<A> extends Set<A> { @Override public Sorted
by yawaramin 10y ago
In Java, you can have:
class Set<A> { public Set<A> union(Collection<A> c) { ... } }
class SortedSet<A> extends Set<A> {
@Override public SortedSet<A> union(Collection<A> c) { ... }
}
In other words, the more specific type overrides the operations of the more general type into more specialised operations.