I am creating an enigma simulation program for some practice with enums. The following is a preliminary draft for the enum of a machine, so I don't have any of the specifics, yet.
The issue is that my IDE keeps saying that the curly braces are not supposed to be there, at the point I am trying to pass an array into the enum constructor.
Is there something wrong with my enum constructor or the enum constant declaration? How can I correct this to make it work?
public enum MACHINETYPE {
WehrmachtEnigma (4, {true, true, true, false}),
KriegsmarineM4(4, {true, true, true, true}),
Abwehr(4, {true, true, true, true});
private final int ROTORS_COUNT;
private final boolean[] STEPPING;
private MACHINETYPE(int rotors, boolean[] stepping){
ROTORS_COUNT = rotors;
STEPPING = stepping;
}
}