Question: do if statements need curly braces?
Answer: No, there is absolutely no difference: a pair of curly braces makes multiple statements into a single one; if , while , for , and so on expect a single statement; if you need to guard only one statement, you do not need braces. However, many software shops insist on having braces even for a single statement.