Compiler Error J0015

Expected ']'

The compiler expected to find a right square bracket in the position indicated by the error message. This error usually occurs when the right square bracket is accidentally omitted from an array declaration. This error is often caused on the line previous to the line the compiler has reported the error on. Ensure that all brackets match and compile again.

The following example illustrates this error:

public class Simple {
   
   private int x[ = new int[500]; // error: ']' omitted
   
}