Type it somewhere else.Then count and make sure you have as many "{" as "}".

I'm assuming that you're reading through the first link I gave you now. In it you will find examples of how to use try-catch blocks. When you have it worked out, you will have a different error in your code: the int-String problem that yawmark's eagle eyes found.

At that point, post your code again and we can discuss how to find out how to convert a String to an integer.

When you post code, please use [code] and [/code] tags as described in [url=http://forum.java.sun.com/features.jsp#Formatting]Formatting Help[/url] on the message entry page. It makes it much easier to read and prevents accidental markup from array indices like [i].