I checked implementation of System.out.println(), which is as follows and I have read this question.
public void println(int x) {
synchronized (this) {
print(x);
newLine();
}
}
According to above implementation the lock is on this
object, so what is the advantage of using synchronized block instead of synchronized method in the above case?