Difficile
Code :
enum Couleur{
BLEU(0), ROUGE(1), VERT(2);
int value;
Couleur(int value){
this.value = value;
}
}
public class QuestionJava {
public static void main(String[] args) {
System.out.println(Couleur.BLEU);
}
}
Que renvoie ce code ?
Auteur: PierreStatut : PubliéeQuestion passée 576 fois
Modifier
1
Ăvaluations de la communautĂ©
Florian
19/02/2022
There's a spelling error here in the code. The author, obviously French, wrote "Colors.BLEU" instead of "Colors.BLUE".
It can lead you to think you should answer "a mistake" whereas it's not the author's intention
Questions similairesPlus de questions sur Java