// trusting the compiler to infer types, you would write: Dalmatian d = selectSuitableDog( dalmatianCollection ); // giving the compiler help with the static type you would write: Dalmatian d = DogSelectorClass< Dalmatian >.selectSuitableDog( dalmatianCollection );