Although this method might be useful for making your code shorter by using fewer lines, we strongly recommend for beginners not to use this short version of statements and always use the full version with { }.
This goes to every statement that can be shorted to a single line (for,while,etc).