Page 20 - PowerPoint Presentation
P. 20

Block Statements











            o Compound/Block Statement: A list of statements enclosed in a pair of braces.



            o Java treats compound statement as a single statement




            o It is very useful to be used with different control structure



            o Syntax of if statement using block statements:



                                             if (conditions){





                                                           statement(s);






                                             }
   15   16   17   18   19   20   21   22   23   24   25