I'm getting an error in Eclipse when trying to initialize the following array in the initializing section of my class:
Color[] colors;
colors = new Color[4];
This is the error I'm getting:
Syntax error on token ";", , expected
Where ";" refers to the semicolon on the first line. Tried different variable types, gave the same error. Here's some code on the official JDK tutorial section that seems the same to me:
http://download.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
Thanks in advance, guys.