Does it compile? No it doesn't. Take a look at this:
[CODE=Java]if(300=500+i;)[/CODE]
The if statement should take a boolean expression -- an expression that's true or false. But "300=500+i; " isn't well-formed. For one, "=" means assignment, so that code is trying to assign 500 plus i to the number 300! Also, expression don't involve a semicolon. Semicolons are used to turn simple expressions into statements, so no semicolons are needed to form expressions.
[CODE=Java]if(300=500+i;)[/CODE]
The if statement should take a boolean expression -- an expression that's true or false. But "300=500+i; " isn't well-formed. For one, "=" means assignment, so that code is trying to assign 500 plus i to the number 300! Also, expression don't involve a semicolon. Semicolons are used to turn simple expressions into statements, so no semicolons are needed to form expressions.
Comment