title: Finding the most repeated integer without Maps
body: <p>I currently have an arraylist of integers from a file that goes as follows. 1,3,4,3,5,6,5,5 I have already sorted the integers but as you can see there are integers that repeat. I would like to know how do I find the integer that is repeated the most then print it out? </p>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.PrintWriter;
  import java.util.ArrayList;
  import java.util.Scanner;
  import java.util.Collections;
  
  
  
  public class Lab8
  {
     public static void main(String[] args) throws FileNotFoundException
     {
  
       ArrayList&lt;Integer&gt;myInts = new ArrayList&lt;Integer&gt;();
  
       Scanner myFile = new Scanner(new File("numbers.txt"));
       while (myFile.hasNextInt())
       {
         myInts.add(myFile.nextInt());
  
       }
       System.out.println(myInts);
       Collections.sort(myInts);
         System.out.println(myInts);
     }
  }
  </code></pre>