title: ParseInt in an array
body: <pre><code>import java.util.Scanner;
  
  public class NumAverage {
  
      public static void main (String [] args)
      {
          //int a,b;
          int[] numbers = new int [10];
  
          Scanner numreader = new Scanner(System.in);
  
          try
          {
              System.out.println("Enter 10 num");
              for (int i = 0; i &lt; numbers.length; i++)
                  numbers[i] = numreader.nextInt();
                  //numbers[i] = Integer.parseInt(s)
              //for (int i = 0; i &lt; numbers.length; i++)
              //{
                  //sum += numbers[i];
              //}
          }
          catch(NumberFormatException numfo)
          {
              System.out.println(numfo.getMessage() + "cannot be converted to integer");
          }
    }
  }
  </code></pre>
  
  <p>How can i get the numbers I have being inputed from the keyboard into the array to be parseInt if the user tries to enter a string instead of an integer</p>