HI
This Question is from Devaka's Practice Exam1 Q.No:72 . Output is "ABC" .Agreed. I read the long discussion on this question. . Here Synchronization wont work as it is on different objects. Okay. Please check the MThread class(below XMap class) from PracticeExam-1 Q NO 44 which was giving compiler error but now modified....
OUTPUT : ABC
OUTPUT: BA (is coming)
I felt XMap and MThread are similar. only difference is that XMap implements Runnable and synchronization blocks are there(but synchronization wont work as it is on different objects) but MThread extends
Thread And no synchronization blocks in this class. in both Thread.sleep() is there but why here first main is getting finished and then only run completes. Really I am in Confusion