If i declare a generic class as something like
public class Driver<V extends Car>
where Car is an interface.
Then, I use it with something like this:
Driver<?> driver = new Driver<Chevrolet>();
I don't want to specify a specific implementation of car as the generic.
Why is it that I cannot call methods implemented in driver that uses the generic class as the parameter?
For example if Driver has a method like
public void drive(V vehicle)
It does not allow me to call that with my instance of driver (Driver<?>
).