File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes using a component Array and Counter-Controlled Loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " using a component Array and Counter-Controlled Loop" Watch " using a component Array and Counter-Controlled Loop" New topic
Author using a component Array and Counter-Controlled Loop

Joniela Geldenhuys

Joined: Aug 24, 2011
Posts: 10

Helo I've just finished coding my one assignment. When I compile they give me an error.

java:88: ')' expected

When I put a ) in they just give me more errors!

Please help

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

This is the Spring forum for Spring Framework questions. I am going to move this to the Beginning Java forum.

I think the main issue is how your curly braces are lined up. I can't tell how things are lined up based on your indentation of code.

I copied your code into my ide and auto-indented and found

There is a semicolon after the curly brace, it should actually be after the curly brace just above it to end the addActionListener() call.

After those lines you have two methods which are not inside your class. The second curly brace I just showed is ending your class, then you have the two methods. You need to move those two methods to before that }//end Checkerboard frame to get the methods to be inside your class.

You always need to make sure curly braces are correctly lined up


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11951

No offense, but you should never have gotten this far. Never, never never write more than 2-3 lines of code before you recompile. I have been know to recompile after writing a single line. Really you should recompile and TEST that often, but I do occasionally skip the testing part. but NEVER the compile.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
== "Go"??

Never use == to test whether reference types are equal, except members of enums. And search our GUIs forum to find why addActionListener(this) is non-object-oriented design.
I agree. Here's the link:
subject: using a component Array and Counter-Controlled Loop
jQuery in Action, 3rd edition