S
sachin
Hi everyone,
I have following code ::
case 1:
public class Resource {
public synchronized void met1()
{ }
public void met2() { }
}
And three threads t1,t2,t3.If thread t1 is using met1() can other
threads t2 ,t3 can use met2() at same time ??
case 2:
Also if the met1() is changed to
public static
synchronized void met1() { }
Can t2,t3 access met2() if t1 is using met1() at same time?
I have following code ::
case 1:
public class Resource {
public synchronized void met1()
{ }
public void met2() { }
}
And three threads t1,t2,t3.If thread t1 is using met1() can other
threads t2 ,t3 can use met2() at same time ??
case 2:
Also if the met1() is changed to
public static
synchronized void met1() { }
Can t2,t3 access met2() if t1 is using met1() at same time?