I Don`t understand the following behaviour:
i habe an object referenced by variable a, im synchronizing 2 methods on it
first method calls wait on it.
second method creates a new object and assigns it to varable a,
than synchronizes on a (the new Object!!!)
But when calling notifyAll() a waiting
thread (who called meth1)is waked up.
But is`nt it true, that we are dealing here with 2 different objects due to the new object instantiation?
By the way:
the following code throws an IllegalMonitorStateException:
Thanks