title: Counting the least occurring in an array of 10 user input integers
body: <p>LeastFrequent - Output the integer which occurs least frequently along with its occurrence count from a list of 10 integers input from System.in. If multiple integers in the list occur least frequently, output any integer that occurs least frequently. Name your class LeastFrequent. You can assume that all 10 integers are in the range -100 to 100 inclusive. </p>
  
  <pre><code>import java.util.*;
  
  public class LeastFrequent 
  {
  public static void main(String[] args) 
  {
      Scanner scan = new Scanner(System.in);
  
      int[] arr = new int[10];
      int[] hold = new int[300];
  
      int x = 0;
      int count = 0;
      int a = 1;
      int least = 0;
  
      System.out.print("numbers: ");
      //adds 10 numbers to an array and counts occurrence
      for(int i=0;i&lt;arr.length;i++)
      {
          arr[i] = scan.nextInt();
          hold[arr[i]]++;
      }
  
      for(int i=0;i&lt;hold.length;i++)
      {
          if(hold[i] &gt; 0)
          {
  
          }
      }
  
  
      System.out.println("least frequent: " + count + " occurs " + arr[count] + " times");
  }
  }
  </code></pre>
  
  <p>I have it asking the user for 10 integers and putting it into the array.
  I also have it counting the occurrence of the input numbers and storing it in another array.
  I am stuck on finding the least frequent one.
  I know i need to scan through the second array again bu i dont know how.
  Any thoughts on how to compare the element's values of the second array while skipping the values that equal 0?</p>