moe
moe

Reputation: 71

I keep getting this "Syntax error on token "(", ; expected after this token" error?

package mathtable;

public class tablefmath {

public static void main(String[] args) {
    // TODO Auto-generated method stub

    final int jMax = 10;
    final int iMax = 15;
    int column=1, row=1;

    System.out.println(" " + "  |  ");

    for (column<=jMax; column++) {
        System.out.println(column + "\t");
    }           
}
}

This is my code. I want to accomplish a multiplication table. I know how to do it but I have a syntax error on my for loop?

Upvotes: 0

Views: 51

Answers (1)

Krassi Em
Krassi Em

Reputation: 192

How about

for (; column<=jMax; column++){

You skipped the ; in the for loop. It should be containing three components.

Upvotes: 1

Related Questions