Syntax error on token "LEFTCURLYBRACE", delete this token

From JavaErrors

Jump to: navigation, search

One way that you can get the error

 Syntax error on token "}", delete this token

is if you have an extra } -- like if you deleted the front part of a loop but didn't get the last bit.

WRONG

 public void foo() 
 {
   // stuff
   }                 // ooops!
   return;
 }

RIGHT

 public void foo() 
 {
   // stuff
   return;
 }