ForumsProgramming Forum[Answered] Incredibly vague Java error description

0 6110
dorukayhan
offline
dorukayhan
1,318 posts
Bard

int[] corner = new int[5]{
corner[0] = 5,
corner[1] = 10,
corner[2] = 15,
corner[3] = 20,
corner[4] = 25;
}

i placed this in a java interface file in eclipse, and then two error notifiers appeared on the lines where i placed corner[4] and the closing parenthesis. on corner[4] it said "insert } to complete ArrayInitializer' and on the closing parenthesis it said "remove this".

where should i put the closing parenthesis to complete ArrayInitializer?

edit: nevermind, i had to put the array in a class rather than an interface

  • 0 Replies
Showing 1-0 of 0