title: How to tell if an object implements a method like toString()?
body: <p>I am writing a testing library and I want to be able to handle objects that may not have been provided their own implementation of <code>String toString()</code>. </p>
  
  <p>In those cases, rather that using the useless default implementation, I'd like to use the <a href="https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/ToStringBuilder.html" rel="nofollow">Apache Commons-Lang <code>ToStringBuilder</code></a> instead... but would rather use an object's implementation of <code>toString()</code> if available.</p>
  
  <p>How can I tell if an object has an implementation of <code>toString()</code> other than the default?</p>