logo

Crowdly

Représentation de la mémoire On dispose de la classe suivante : public cla...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Représentation de la mémoire

On dispose de la classe suivante :

public class Sport{

private String nom;

public Sport(String nom){

this.nom = nom;

}

public void setNom(String nom){

this.nom = nom;

}

public String getNom(){

return this.nom;

}

@Override

public String toString(){

return this.nom;

}

}

Et voici un extrait de code d'un exécutable :

Sport unSport, unAutreSport;

unSport = new Sport("claquettes");

unAutreSport = unSport;

unAutreSport.setNom("aqua poney");

unAutreSport = new Sport("danse irlandaise");

System.out.println(unSport);

System.out.println(unAutreSport);

Quelle est l'affichage en sortie standard provoqué par l'extrait de code donné ?

0%
0%
0%
0%
0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on celene.univ-orleans.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!