The main difference is the each enum
class implicitly extends Enum>
class. This leads to that:
enum
objects have such methods as name()
and ordinal()
enum
objects have special toString()
, hashCode()
, equals()
and compareTo()
implementations
enum
objects are suitable for switch
operator.
All mentioned above is not applicable for your version of Direction
class. This is the "meaning" difference.