its saying, the compiler that ")" is expected in the system.out.println line, line 18 but i think i did this and the error was still there. im guesssing ive made a mistake in my program elsewhere.
public class ArrayTest
{
int[] table = new int[4]; //integer array with 4 slots
public static void main(String[] args)
{
table[0] = 10; // the first index in an array is 0
table[1] = 20;
table[2] = 30;
table[3] = 40;
printTable(); //method call to the printTable method/function
}
void printTable();
{
for(int i=0; i<table.length; i++) //loop
{
System.out.println(printing: + table[i]); // print statement
}
}
}


Reply With Quote


Bookmarks