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 Personnage{

private String nom;

public Personnage(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 :

Personnage unPersonnage, unAutrePersonnage;

unPersonnage = new Personnage("yoda");

unAutrePersonnage = unPersonnage;

unAutrePersonnage = new Personnage("ashoka");

unAutrePersonnage.setNom("obiwan");

System.out.println(unPersonnage);

System.out.println(unAutrePersonnage);

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!