title: Initialise an array and compute the frequency of numbers in a range
body: <p>// note this is a practice question
  I'm trying to Initialise an array with 50 integer values and compute the frequency of numbers in the range 10 .. 19.(with a user input)
  So far i have the user input working only allowing numbers between 10 and 19 to be entered, But my next step and problem is to calculate the frequency of what numbers the user used in the input. Any help in starting this next step would be greatly appreciated. </p>
  
  <pre><code>import java.util.Scanner;
  
  public class Ex1partA {
      public static void main(String[] args) {
          Scanner kbin = new Scanner(System.in);
  
          int list[]=new int[50];
          int i=0;
  
          System.out.print("\n\tInput numbers from 10 to 19: \n");
  
          while (i &lt; 50) {
              int value = kbin.nextInt();
  
              if (value &gt;= 10 &amp; value &lt;= 19) {
                  list[i] = value;
                  i++;
              } else {
                  System.out.println("!! Bad number !!");
              }
  
          }
  
          for (int value : list) {
              System.out.println(" "+value);
          }
      }
  }
  </code></pre>