0
Declares list to be an array of 3 elements and initializes list[0] to 5, list[1] to 6, and list[2] to 3 (what's the error)
2 Réponses
0
remove ; from the end of the for loop in line 10.
public class Program
{
public static void main(String[] args) {
int[]list = new int[3];
list[0] = 5;
list[1] = 6;
list[2] = 3;
for(int x=0; x<3; x++) {
System.out.println(list[x]);
}//end for
}
}
+ 2
Just remove the semi-colon in for loop end statement.