If you would use the javac command's -Xlint option, the compiler would give you this error for the way you coded the if statement: