title: Find most appearing string in ArrayList
body: <p>If I have an ArrayList of these strings...</p>
  
  <p>"String1, String1, String1, String2, String2, String2, String3, String3"</p>
  
  <p>How can I find the most appearing string in this list?  If there are any duplicates, I would want to put both into the same list and deal with that accordingly.  How could I do this, assuming that the list of strings could be of any size.</p>
  
  <p>This is about as far as I've gotten:  </p>
  
  <pre><code>public String getVotedMap() {
          int[] votedMaps = new int[getAvailibleMaps().size()];
  
  
          ArrayList&lt;String&gt; mostVoted = new ArrayList&lt;String&gt;();
  
          int best = 0;
  
          for(int i = 0; i &lt; votedMaps.length; i++) {
              if(best &gt; i) {
                  best = i;
              } else if(best == i) {
  
              } else {
  
              }
          }
  
      }
  </code></pre>
  
  <p>getAvailibleMaps() is a list of Maps that I would choose from (again, can get any size)
  Thanks!</p>