What will be the output order of the messages below? Threads…
What will be the output order of the messages below? Threads call print(“A”), print(“B”), print(“C”) on the same instance. class Printer { void print(String msg) { synchronized(this) { System.out.println(“[” + msg + “]”); try { Thread.sleep(100); } catch (InterruptedException e) {} } } }
Read Details