I have created an enum as so:
enum Types { hi, hello, bye }
I have added a getter inside each individual enum as so:
enum Types {
hi {
String test = "From hi";
public String getString() {
return test;
},
etc.
}
Except I cannot call "Types.hi.getString()". Is there any way to do this? Thanks!