It looks like you're new here. If you want to get involved, click one of these buttons!
I didn't use curly brackets in my if else statement, and it is still correct .
Why is this?
If you keep your whole statement on one line you don't need the curly brackets .
I got confused by that too yesterday.
What i found out is that it is fine to not use curly brackets if you only write one Line of code into your if statement.
As soon as you want to use more Lines inside your if statement your Programm can fail.
So i think its best to simply always use curly brackets.
ok thank you very much