Hard
Given this code :
enum Color{
BLUE(0), RED(1), GREEN(2);
int value;
Color(int value){
this.value = value;
}
}
public class QuestionJava {
public static void main(String[] args){
System.out.println(Color.BLUE);
}
}
What will this code display?
Author: PierreStatus: PublishedQuestion passed 576 times
Edit
1
Community Evaluations
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