I've got the following enum:
public enum myEnum {
ONE("ONE"), TWO("TWO");
private String name;
private myEnum(String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
};
My question is why does the following evaluate to false? I suspect it has something to do with the implementation of the equals() method.
(myEnum.ONE).equals(myEnum.ONE.toString())