Here is an enum Commands with four constants:
public enum Commands {
SIT, DOWN, STAY, COME
}
What does this code line print?
System.out.println(Commands.STAY.ordinal());
Write the result with one integer number.
Here is an enum Commands with four constants:
public enum Commands {
SIT, DOWN, STAY, COME
}
What does this code line print?
System.out.println(Commands.STAY.ordinal());
Write the result with one integer number.
Create a free account to access the full topic