share| improve this answer. Remove the ; from the line end here:. remove semicolon ( ; ) at the end of the statement if ( option. equals( " Multiplication" ) ) ;. You are declaring a field outside the class: import java. BorderLayout; import java. Canvas; import java. Dimension; import javax. JFrame; public boolean running = false; / / / < = = = = = = = = = = = = = = = invalid location. By your long if statement, get rid of the semicolon at the end. / / The semicolon at the end of this line if. Then the tokenizer detects a dangling else token and complains. You have a semi- colon right after your if statement which kills the loop prematurely. Just delete the semi- colon and the error will go away.
Change this: if ( this. balance - withdrawlAmount < = 0) ; { / /. To this: if( this. The problem is in the code you provided on your paste bin. You use two else statements, so Java complains as it doesn' t know which to go to after the initial if statement. You need to enter in another conditional statement. I copy a piece code from a website into the Eclipse. the IDE editor prompt that: Syntax error on tokens, delete these tokens. I am sure that my code is OK. If I manually input the code, it' s ok. I open the java file from Notepad+ +. your code is missing braces ( that' s these: { } BTW). It' s ok if your if statement involves only a single line, however i' d advise to use them anyway for readability.
Overall, your code should look similar to:. You should add type to arguments, for example, ( HashMap params, boolean checksumReceived_ from_ Payu).