You can use the old way:
public List magicalListGetter() {
List list = doMagicalVooDooHere();
return list;
}
or you can use Object
and the parent class of everything:
public List<Object> magicalListGetter() {
List<Object> list = doMagicalVooDooHere();
return list;
}
Note Perhaps there is a better parent class for all the objects you will put in the list. For example, Number
would allow you to put Double
and Integer
in there.