Today, after half an hour of searching for a bug, I discovered that it is possible to put a semicolon after an if statement instead of code, like this:
if(a
If you're using Eclipse, you can make it warn you about those statements: