yes and no.
yes: you do need to do
if(input == valueToCheck)
if it are integers, since you want to compare the value to equality and they're not Objects.
no: you do not want to put the ';' straight after the if. what happens if what is between the brackets is true, is what is behind the if statement, until the first ';' if there are no '{ }'
so, if you would check it like that, and put the ';', you would automatically run the next lines, if the statement was true or not, since the next lines are not dependent on the if.
Reputation Points: 919
Solved Threads: 354
Nearly a Posting Maven
Offline 2,487 posts
since Jan 2007