logo

Crowdly

Browser

Додати до Chrome

L'exécution du code ci-dessous donne quel affichage ?... class Vehicule { ...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

L'exécution du code ci-dessous donne quel affichage ?...

class Vehicule {

public void demarrer() {

System.out.println("Demarrage Vehicule");

}

}

class VehiculeMotorise extends Vehicule {

public void demarrer() {

System.out.println("Demarrage VehiculeMotorise");

}

}

class Velo extends Vehicule { }

class Automobile extends VehiculeMotorise {

public void demarrer() {

System.out.println("Demarrage Automobile");

}

}

class Test {

public static void main(String[] args) {

VehiculeMotorise vehMot = new Automobile();

Vehicule veh = new Automobile();

Automobile auto = (Automobile) veh;

veh.demarrer();

vehMot.demarrer();

auto.demarrer();

}

}

0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.univ-lr.fr?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome