Directions

Report a typo

You are given an enum Direction:

enum Direction {
    EAST("E"), 
    WEST("W"), 
    NORTH("N"), 
    SOUTH("S"); 

    private final String shortCode;

    Direction(String code) {
        this.shortCode = code;
    }

    public String getShortCode() {
      return this.shortCode;
    }
}

Select all correct statements about this enumeration.

Select one or more options from the list
___

Create a free account to access the full topic