Both methods lock the same monitor. Therefore, you can’t simultaneously execute them on the same object from different threads (one of the two methods will block until the other is finished).
Both methods lock the same monitor. Therefore, you can’t simultaneously execute them on the same object from different threads (one of the two methods will block until the other is finished).