Remember that by default you have a
thread called main. The main thread here will create Master object m and will run m.go().
Once inside m.go() a new thread t1 is created. Now we have main thread which is at the while(bContinue==false) statement and t1 thread running the run method of Slave.
The t1 thread operates on the Slave object s. Since the run method of slave is synchronized therefore the thread t1 has a lock on object s and main thread cannot run any other synchronized methods of s until t1 is done with the run method.
Since run method has an infite loop t1 will never release the lock of s and main will forever get stuck at s.setPrice(200) line. That's why you keep seeing repeated 100 but no 200.
Hope this helps.