???????????????????????????е????

 

read1 begin
read1 end
read2 begin
read2 end

??????????read2????synchronized?????????????????????????У???

 

read1 begin
read2 begin
read2 end
read1 end

???????read2??????

 

public void read2() {
synchronized(this)
{
System.out.println("read2 begin");
try {
Thread.currentThread().sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("read2 end");
}
}

??????this???м???????????Σ???????????е??