20.2k views
2 votes
Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?

1 Answer

7 votes

Step-by-step explanation:

The argument is for the right braces.The right braces are used for simplicity.The right brace always terminates a block of code or a function.

The argument against right brace is that when we see a right brace in a program,we are not obvious about the location of the corresponding left brace because all or multiple statement end with a right brace.

User Carr
by
5.2k points