java get enum from string code example
Example: java get enum from string
public enum Hello {
A, B, C
};
val = Hello.valueOf("A") // Case sensitive and cannot have spaces in the string
val.equals(Hello.A) // returns true
public enum Hello {
A, B, C
};
val = Hello.valueOf("A") // Case sensitive and cannot have spaces in the string
val.equals(Hello.A) // returns true