The above
test produces the following output
I don't understand why the last three
thread are not using the
String object as a shared lock like the first three threads. Even though they last three threads are using a different instance of 'RunnableThread', shouldnt they be synchronised because there is only once copy for 'str' in the string constant pool?
Thanks