Hy,
Please help me with the folowing polymorphic example:
interface Car {}
class Toyota implements Car {}
class ToyotaSUV extends Toyota {}
class Drive {
public static void main(String [] args){
Car c = new Car();
Toyota t = new ToyotaSUV();
Car s = new ToyotaSuv();
}
Which of the above can and can't be instantiated?
ToyotaSUV can be a Toyota or/and Car?
Sincerely,