Basically, there are no such advantages of using a synchronized method over a block. In the synchronized method, we do not need to include "this" as a reference.
For Method:
public synchronized void method() { // blocks "this" from here....
...
...
...
} // to here
For Block:
public void method() {
synchronized( this ) { // blocks "this" from here ....
....
....
....
} // to here...
}
I hope this will help.
Want to become a Java Expert? Join Java Training now!!
Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Tutorial: