title: Sort alphabetically ArrayList of Strings in java
body: <p>I am trying to sort an ArrayList of strings. So far I have tried using <code>ArrayList.sort</code> but I am note sure how to use it properly.</p>
  
  <p>My class looks like this: </p>
  
  <pre><code>     ArrayList&lt;String&gt; arraylist = new ArrayList&lt;&gt;();
          String value,value1,value2;
          value="String1";
          value1="String2";
          value3="String3";
  
          arraylist.add(value);
          arraylist.add(value1);
          arraylist.add(value2);
  </code></pre>
  
  <p>I have no idea how to sort this one. 
  Last time when I was using ArrayList of custom objects like</p>
  
  <pre><code>ArrayList&lt;myObject&gt; = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>I implemented <code>Comparable</code> interface, then I overrode the <code>compareTo</code> method in myObject class and everything was...easier.</p>
  
  <p>How do I sort with ArrayList using just simple Strings?</p>
  
  <p>@Edit
  Trying few things on my own, I've used <code>arraylist.sort(null)</code> and somehow it worked like it was supposed to. No more help is needed, thank you guys.</p>