| COBOL | Java | 
|---|---|
| *> Synchronize on an object's monitor, in this case *> the current object sync on self *> The code here is synchronized end-sync | // Synchronize on an object's monitor, in this case
// the current object
synchronized (this)
{
    // The code here is synchronized
} | 
Portions of these examples were produced by Dr. Frank McCown, Harding University Computer Science Dept, and are licensed under a Creative Commons License.