I have a
public abstract class Person{/*..*/}
public class Woman extends Person{/*..*/}
public class Man extends Person{/*..*/}
I'm trying to instantiate a List that could contain either Man or Woman, I tried this :
List<? extends Person> PersonTypes = new List<? extends Person>()
But it can't be instantiated, is there a way to achieve what I want and keeping Person abstract ?