Safe publication
<p>Could not understand methods 1 and 3 as to how it helps to achieve safe publication. Can anyone help me understand this with an example if possible.</p>

<blockquote>
  <p>To publish an object safely, both the
  reference to the object and the
  object's state must be made visible to
  other threads at the same time. A
  properly constructed object can be
  safely published by:</p>
  
  <ul>
  <li><p>Initializing an object reference from    a static initializer</p></li>
  <li><p>Storing a reference to it into a     volatile field or AtomicReference</p></li>
  <li><p>Storing a reference to it into a  final field of a properly constructed 
  object</p></li>
  <li><p>Storing a reference to it into a     field that is properly guarded by a<br>
  lock.</p></li>
  </ul>
</blockquote>
