Multiple choice

Which of the following is a true statement in java?

  1. Static block is always executed when the JVM loads the class in java.

  2. Static method can be synchronized in java.

  3. We can throw exception in a static block.

  4. All of the above are true.

  5. Only (1) and (3) are true.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes, all of the above are the true statement in java.