More on
synchronized
•
synchronized
deals with locks on a
given object.
Every object only has 1
lock.
It can be used as a statement
inside a block of code instead of on a
whole method.
{ …
synchronized (o) { … }
}