title: java - static method is implicitly thread safe?
body: <p>One of my java <strong>static</strong> method is accessed by multiple threads . Do I need to synchronize the method explicitly by synchronized keyword?.</p>
  
  <p>Sometime back I read in a book which states that </p>
  
  <blockquote>
    <p>static method is implicitly thread safe as the method is not object
    specific</p>
  </blockquote>
  
  <p>.</p>
  
  <p>Well known example is  , Singleton implementation.
  In which getInstance() is static and do we need to mark this as synchronized as well? </p>
  
  <pre><code> public synchronized static Logger getInstance() {
           if( instance == null ){
               instance = new Logger();
           }
  
           return instance;
       }
  </code></pre>
  
  <p>Thanks</p>