Is the this
and Example.this
the same object?
E.g. Is the call this
and Example.class
inside the synchronized
the same object?
class Example {
public Example() {
synchronized(this) {
// some code
}
}
}
class Example {
public Example() {
synchronized(Example.class) {
// some code
}
}
}