title: NumberFormatException get average
body: <p>Design and implement a program that reads a series of 10 integers from the user and prints their average. Read each input value as a string, and then attempt to convert it to an integer using the Integer.parseInt method. If this process throws a NumberFormatException (meaning that the input is not a valid number), print an appropriate error message and prompt for the number again. Continue reading values until 10 valid integers have been entered. </p>
  
  <p>Input
  •   10 integers inputed from the user through the keyboard
  Output
  •   Prints the average of the number
  •   Error message
  o   If the thing that is entered is not an integer
  Process
  •   Import Scanner class
  •   Read in each integer value
  o   Convert integer using integer.parseInt method
  •   Create exception
  o   Throws NumberFormatException
     Not valid
     Print error message</p>
  
  <p>So I am currently designing this and I have no where to begin on the coding. How do I incorporate the numberformatexception and the parseint?</p>
  
  <p>EDIT</p>
  
  <p>import java.util.Scanner;</p>
  
  <p>public class NumAverage {</p>
  
  <pre><code>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)
      }
      catch(NumberFormatException numfo)
      {
          System.out.println(numfo.getMessage() + "cannot be converted to integer");
      }
  </code></pre>
  
  <p>}
  }</p>
  
  <p>So how can I get the numbers from my array to be parseInted.</p>