Sorry, I didn't notice it was you. I thought it was the OP posting that comment. I have no idea what he knows or doesn't know about Java syntax.
Type: Posts; User: Norm
Sorry, I didn't notice it was you. I thought it was the OP posting that comment. I have no idea what he knows or doesn't know about Java syntax.
I didn't imagine that finding the paired {} was so hard.
Did you print it out on paper and use a pen to match the {}s?
Or another approach: make a copy of the code. Find an inner most { and label...
Do you mean a paranthesis? You use pairs of them with methods.
You need to pair them up. Start at the middle and pair the {}. Work out to the next pair and continue until you find the unpaired {}.
Either use an editor tool or print it on paper and use a...
The compiler is looking for a class but is finding code that should be in a method.
Is the code you posted inside of a method?
Where is the } that pairs with the { at the end of this line?
public static void main(String[] args) {
The code within those that pair of {} is what is in the main method. The main method...
Can you see the 5 lines of code you posted?
Is there a } character there?
Please use code tags when posting your code. See: BB Code List - Java Forums
If your editor does not have the tool to match a { with its paired }, your next option is to print it and use a pen to manually pair the { }s. Start at the middle, circle the { and find the paired }...