hi,
say i have a class Animal, and then classes Dog and Cat that extend it. Can i have a method then that returns dog or cat, depending on some value? so, something like this, except working :)
public <T extends Animal> getAnimal(){
if (a)
return new Dog();
else
return new Cat();
}