You simply did not initialize the array correctly:
String[] options = ( "Delete Task", "Return" );
Replace the ()
by {}
to get:
String[] options = { "Delete Task", "Return" };
You can further refer to Array Initializers to get more info on how to initialize an array.
(Also next time, please indicate the line in your code with the error – it would have been faster to spot the error this way)
1
solved Left-hand side of an assignment must be a variable [closed]