I want to use this enum structure in order to return string.
public enum Exchanges {
PROCESSING("processing");
private final String type;
Exchanges(final String type) {
this.type = type;
}
public String getType() {
return type;
}
@Override
public String toString() {
return type;
}
}
When I use Exchanges.PROCESSING
I get error:
Syntax error, insert "VariableDeclarators" to complete
LocalVariableDeclaration
How I can fix this issue?