synchronized(syncObject) { // This code can only be accessed // by one thread at a time }