You need to start sorting these syntax errors for yourself - you really didn't spend any significant time trying to fix this, given the time different between this and your previous syntax error ridden question / answers.
Syntax errors are part of life: they mean you typed it wrong and are simple to fix.
Just look at the error message and it will show you the file name, the line and column it found an error on, and give you a message describing the error.
So look at that line and consider what the message is trying to tell you: "'else' without 'if'"
That means it finds an
else
clause that can't be "tied up" with an
if
clause - and the syntax of an
if
statement in Java is simple:
if (condition1) {
} else if (condition2) {
} else {
}
So all you have to do is look at the code above the line it found the problem on and see where the
if
that you think it matches is, and why it isn't "lining up" correctly.
And there are two reasons why in that code: a spurious semicolon you haven't noticed yet, and an else that is all alone.
Fix that one error, and compile again - the chances are many errors will go away at the same time!
Give it a try: you are going to be fixing syntax errors for a long time, and it's much, much quicker to be able to solve them yourself that it is to post for help on trivial matters like this and have to wait for a reply!