title: Java Converting String into Integer for Comparison
body: <p>I am writing a <code>compareTo</code> method for the Comparable Interface for a specific class. I need to take two different strings and compare them and see if one holds a greater value than the other. I would normally use <code>.compareTo()</code> but in this case it is giving me an error and not working. 
  This is what I have:</p>
  
  <pre><code>public int compareTo(Object o) {
      if (name &lt; ((AccountOwnerComparable) o).name)
          return -1;
      else if (name &gt; ((AccountOwnerComparable) o).name)
          return 1;
      else
          return 0;
  
  }
  </code></pre>
  
  <p>I know I can't use the <code>&lt; or &gt;</code> but it is just to show what the scenario is.</p>