title: How to switch int sort to String sort?
body: <p>I have written some code for sorting random integers that a user inputted. How would I switch this into sorting randomly inputted letters? Aka, user inputs j, s, g, w, and the programs outputs g, j, s, w? </p>
  
  <pre><code>for (int i = 0; i &lt; random.length; i++) { //"random" is array with stored integers
                  // Assume first value is x
                  x = i;
                  for (int j = i + 1; j &lt; random.length; j++) {
                      //find smallest value in array (random)
                      if (random[j] &lt; random[x]) {
                          x = j;
                      }
                  }
                  if (x != i) {
                      //swap the values if not in correct order
                      final int temp = random[i];
                      random[i] = random[x];
                      random[x] = temp;
                  }
                  itsATextArea.append(random[i] + "\n");// Output ascending order
              }
  </code></pre>
  
  <p>Originally I hoped (though I knew the chances of me being right were against me) that replacing all the 'int' with 'String' would work...naturally I was wrong and realized perhaps I had to list out what letter came before which by using lists such as list.add("a"); etc.</p>
  
  <p>I apologize if this seems like I am asking you guys to do all the work (which I'm not) but I'm not entirely sure how to start going about this, so if anyone can give some hints or tips, that would be most appreciated! </p>