This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 17271

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11855

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: 43935
== "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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: using a component Array and Counter-Controlled Loop
It's not a secret anymore!