A

Admin • 828.43K Points
Coach

Q. Which of the following is true about `synchronized` blocks?

  • (A) They can only be used on static methods
  • (B) They allow multiple threads to execute critical section simultaneously
  • (C) They prevent race conditions
  • (D) They are slower than unsynchronized blocks but offer no benefit

Explanation by: Admin
`synchronized` blocks prevent multiple threads from executing the same code simultaneously.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.