title: Is it legitimate to change a String to Int so that I can sort it better?
body: <p>I have many Strings, for example (&quot;a32ghS:SAD&quot;) and I need to sort them. Is it okay to get a integer value like this:</p>
  <pre><code>String s = &quot;a32ghS:SAD&quot;;
  int l = 0;
  for (int i = 0; i &lt; s.length(); i++) {
      l += (int) s.charAt(i);
  }
  </code></pre>
  <p>Is it okay to sort the Strings based on the integer l? Or should I sort them based on it's String?</p>