Here are 10 essential multiple-choice questions on Java Synchronization Basics, covering key concepts.
Question 3
What is the output of the following code?
public synchronized void print() {
System.out.println("Start");
try { Thread.sleep(100); } catch (Exception e) {}
System.out.println("End");
}
Question 9
Which interface or class in Java provides explicit locking besides synchronized?
Question 10
What happens if two threads access a non-synchronized method of the same object?
There are 10 questions to complete.
Quiz about Java Synchronization Basics