Reputation: 5532
Machine is defined as public enum Machine{...}
_machines
is defined as private Machine[] _machines;
Don't know why this doesn't work:
_machines = {Machine.a, Machine.b};
error message:
illegal start of expression
Thank you guys!
Upvotes: 22
Views: 95593
Reputation: 21
This can also be declared empty at first if you give it a size.
_machines = new Machine[size];
Upvotes: 2
Reputation: 138874
You are missing one tiny part of the Array declaration.
_machines = new Machine[]{Machine.a, Machine.b};
Upvotes: 49