Is it possible to have an array as an attribute in an enum?
public enum dsfd{
MANEUVERS({"IMC_ID_MAN_TYPE"});
public final String columns[];
private dsfd(String column[]){
this.columns = column;
}
}
I get the errors:
Syntax error on token "{", @ expected after this token line 1
Syntax error, insert "Identifier" to complete EnumConstant line 2
What am I doing wrong?
I don't know how to unflag as duplicate but my question was not how to initialize an array with values but how to do it directly in the enumeration constructor (or any other method call I guess...).