synchronized(a); //lock on object a
- first aquire object a
- then release object a
synchronized - structured lock
wait + notify
lock + unlock - unstructured lock
there are specific readlock and writelock
t1 = new Thread(s1); //crte thread
t1.start; //start thread
t1.join(); //wait for t1