generic fizzbuzz in java