Ukraine flag Armor Games stands with Ukraine Ukraine flag
If you’d like to help, please consider giving to Ukraine Crisis Fund

ForumsProgramming Forum[Answered] Incredibly vague Java error description

0 5002
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 91-90 of 0

We may use cookies to help customize your experience, including performing analytics and serving ads.
Learn More