syntax error: insert } to complete ClassBody

You really want to go to the top of your file and do proper and consistent indention all the way to the bottom.

For example…

private void putThreeBeepers() 
{
    for (int i = 0; i < 2; i++) {
        putBeeper();
        move();
    }

    putBeeper();
}

private void backUp() 
{
    turnAround();
    move();
    turnAround();
}

Odds are, somewhere along the line, you are missing a }. Your description isn’t super clear, but if the code you posted is how you actually have it formatted in your file then odds are you just missed something somewhere… and poor indentation makes it very hard to spot.

The fact that the message is changing is confusing, but it is the sort of thing you see in these cases.

Leave a Comment