+ 8
what is the benefit of the curly brace { } and how to use it in the code
4 ответов
+ 3
Curly braces are just like what lines are for a map. without lines in a map one wont be in position to tell how do you reach from one place to another.
In the same way . an open brace and closed brace tells both the compiler and developer a clear understanding of what was the code written for .
+ 2
you use them when u make a new function, when you make a if statement or for,while loops. with them your app will work corectly
also in do{ }while(example: true) or in try{ } catch(exception){ }
0
Curly braces are used to contain a set of statements.
for example:
if(some condition)
{
some statement;
}
0
{ } are basically a place holders