可能性の重複:
What is the difference between a synchronized method and synchronized block in Java?
What is the difference between a synchronized function and synchronized block?Javaの同期の違いスレッド
が、私はそれが排他制御のためであると考えているスレッドのためにこれらの2つのコードの違いを理解しないが、私はunderstqndいけませんあなたは私の助けを差し上げることができますか?
public synchronized void Method1() {
}
public myFunction(){
synchronized (this) {
}
}
ありがとうございました。
またはhttp://stackoverflow.com/questions/1149928/what-is-the-difference-between-a-synchronized-method-and-synchronized-block-in-j – bdonlan