Array initializer is not allowed here [duplicate]

You should use

pos = new int[]{1,2,3};

You can only use the abbreviated syntax int[] pos = {0,1,2}; at variable initialization time.

private int[] values1 = new int[]{1,2,3,4};
private int[] values2 = {1,2,3,4}; // short form is allowed only at variable initialization

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)