Hi,
With the following code, if a thread calls LoggingWidget.doSomething(), what is the order of lock acquisition that the thread has to go through? (i.e. does it get the Lock on LoggingWidget first, and then gets the lock on Widget ? )
public class Widget {
public synchronized void doSomething() {
}
}
public class LoggingWidget extends Widget {
public synchronized void doSomething() {
System.out.println(toString() + ": calling doSomething");
super.doSomething();
}
}