Continuing with my
Thread vs Runnable doubts, in the following code:
Here, which object is locked for the synchronized. Is it Thread object or Runnable?
The output prints:
this is the object of thread1.SynchInRunnable@119c082
which doesn't tell me a whole lot