207k views
4 votes
A java program block starts with an open brace ({) and ends with a closing brace (}). (True)

User Wayan
by
7.5k points

1 Answer

6 votes

Answer:

Yes, the answer is true. A block of code in Java is outlined by a pair of braces, "{}".

Step-by-step explanation:

For example:

---

public class HelloWorld {

public static void main(String[] args) {

// This is a block of code

System.out.println("Hello World!");

}

}

---

The main method and the HelloWorld class are both blocks of code that contain braces.

User Joseph Webber
by
8.6k points