I have a class
class Foo{
static synchronized get(){}
synchronized() getMore(){}
}
I have 2 objects Foo.get()
and f.getMore()
running in 2 different threads t1 and t2. i had a dobuts whether when thread t1 had got a lock on the class can thread t2 access the method getMore or would t2 be prevented from getting the access and the lock to the method since the class object is locked by t1.