Commands

Report a typo

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.

Enter a number
___

Create a free account to access the full topic