KnowledgeBoat Logo

Computer Applications

Which of the following is used to enclose a set of statements to form a compound statement in Java program?

  1. Parenthesis
  2. Brackets
  3. Curly brackets
  4. All of them

Input in Java

11 Likes

Answer

Curly brackets

Reason — A set of two or more statements placed within curly brackets and executed together is called compound statement.

Note — Here, there is a misprint in part (3). Curly bracket has been misprinted as square brackets.

Answered By

8 Likes


Related Questions