Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. class Student{
  2. void method1(){
  3. // Do Something
  4. }
  5. void method2(){
  6. // Do Something
  7. }
  8.  
  9. void someMethod(){
  10. synchronized(student){
  11. // critical section of code
  12. }
  13.  
  14. student.method1();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement