title: toString vs toString(parameter) vs valueOf(parameter) in java
body: <p>I am still confused what is the exact difference between this three methods</p>
  
  <p>For example:</p>
  
  <pre><code>Double d = 19.23456;
  System.out.println(d.toString());
  System.out.println(Double.toString(d));
  System.out.println(String.valueOf(d));
  </code></pre>
  
  <p>All the above methods print the value, but I would like to know more of a logical meaning and differences between these methods. Which method is suitable for which scenarios?</p>
  
  <p>I have gone through the below link where the accepted answer states toString(parameter) and valueOf(parameter) are the same. Then what about <code>toString</code>? May be I am missing a significant point or something. If so please turn my attention towards it.</p>
  
  <p><a href="https://stackoverflow.com/questions/3335737/integer-tostringint-i-vs-string-valueofint-i">Integer.toString(int i) vs String.valueOf(int i)</a></p>
  
  <p>I have read the documentation but I couldn't make out the differences after reading it.</p>
  
  <p>According to the official docs:</p>
  
  <p><strong>toString</strong></p>
  
  <pre><code> Returns a string containing a concise, human-readable description of this object.
   Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. 
  The default implementation is equivalent to the following expression: 
  
             getClass().getName() + '@' + Integer.toHexString(hashCode())
  </code></pre>
  
  <p><strong>toString(parameter)</strong></p>
  
  <pre><code>Returns a string containing a concise, human-readable description of the specified double value
  </code></pre>
  
  <p><strong>valueOf(parameter)</strong></p>
  
  <pre><code>Converts the specified object to its string representation. If the object is null return the string "null", otherwise use toString() to get the string representation.
  </code></pre>
  
  <p>Thank you in advance</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Well I am satisfied by both the answers provided by Eran and zapl. Each of the answers clears the concepts of this method within a specific perspective. For the sake of accepting an answer I would be accepting one. Thank You for clearing my doubt.</p>