title: A method written in a weird way, is my suggestion correct?
body: <p>I have a method is someone else's program but I would rather write it in a more readable way. I just need to check whether my suggestion is correct or not.</p>
  
  <p>Current Written As :</p>
  
  <pre><code>if (userData instanceof String &amp;&amp; ((String) userData).compareTo(name) == 0)
  </code></pre>
  
  <p>Could be :</p>
  
  <pre><code>if(.... &amp;&amp; userData.equals(name))
  </code></pre>
  
  <p>Thanks</p>