結果 : how to avoid deadlock situation in java