I have superclass Foo. And a class Bar extending it.
public class Bar extends Foo
Function in Foo:
protected void saveAll(C
You just overriding methods with different Signatures.
What will be good idea is to use PECS (Producer - Extends, Consumer - Super) rule described in Effective Java Second Edition by Joshua Bloch.
according to this rule it should looks like this.
In Foo class:
public class Foo{
protected void saveAll(Collection super E> many){....}
protected void getAll(Collection extends E> many){....}
}