English

What defines a block of code in Java?

Advertisements

Question

What defines a block of code in Java?

Short Answer
Advertisements

Solution

In Java, a block of code is defined by a pair of curly braces { }. These braces enclose a group of statements that are treated as a single unit. The opening brace { marks the beginning of the block, while the closing brace } marks its end.

shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Variables and Expressions - SHORT ASSIGNMENTS [Page 136]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 6 Variables and Expressions
SHORT ASSIGNMENTS | Q 32. | Page 136
Advertisements
Share
Notifications



      Forgot password?
Use app×