title: Finding the mode of an array: no output
body: <p>I'm writing a program that takes 10 numbers as input and displays the mode of the numbers using parallel arrays and a method that takes an array of numbers as a parameter and returns the value that appears most often in the array. PROBLEM: However, when I run my program it has absolutely no output, also, I am not sure how to implement the parallel arrays. 
  Does anyone know? 
  Thank you. </p>
  
  <pre><code>import java.util.Scanner;
  </code></pre>
  
  <p>public class Mode {</p>
  
  <pre><code>public static void main(String[] args) {
  }
  
  public int computeMode(int[] nums) {
      Scanner scanner = new Scanner(System.in);
  
      int maxValue = -1;
      int maxCount = 0;
      int x = 0;
      //count how many times nums[i] appears in array
  
      System.out.println("Enter 10 numbers: ");
      for (int i = 0; i &lt; 10; i++) {
  
          try { //try catch exception to catch decimal inputs as well as more /less than 10 integers
              x = scanner.nextInt();
          } catch (Exception e) {
              System.out.println("Invalid input! Please reenter 10 integer values.");
              scanner = new Scanner(System.in);
              i = -1;
  
              continue;
          }
          for (i = 0; i &lt; nums.length; i++) {
              int count = 0;
              for (int j = 0; j &lt; nums.length; j++) {
                  if (nums[j] == nums[i]) {
                      count++;
                  }
              }
  
              if (count &gt; maxCount) {
                  maxValue = nums[i];
                  maxCount = count;
                  System.out.println("The mode is: " + maxValue);
              }
  
          }
  
      }
      return maxValue;
  }
  </code></pre>
  
  <p>}</p>