What are the advantages of private locks over built-in locks?

public class User implements Serializable {
   private Object lock = new Object();
   public void get(){
       synchronized (lock){
           
       }
   }
}
Mar.16,2021

happened to have written this article to make a comprehensive comparison of
https://codeshelper.com/a/11.

.
Menu