Multiple choice technology programming languages

Which of the following statements are true about synchronization? choose two

  1. Static methods cannot be synchronized

  2. Synchronized methods cannot make calls to non-synchronized methods

  3. A synchronized method can be overridden to be non-synchronized and vice versa

  4. When a thread is executing a synchronized method, other threads can freely access non-synchronized methods of the same object

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

In Java, synchronized methods can be overridden to be non-synchronized (and vice versa) because synchronization is a property of the implementation, not the method signature. Additionally, while a thread holds a lock on a synchronized method, other threads can freely access non-synchronized methods.