title: Difference between casting to String and String.valueOf
body: <p>What is the difference between</p>
  
  <pre><code>Object foo = "something";
  String bar = String.valueOf(foo);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Object foo = "something";
  String bar = (String) foo;
  </code></pre>