title: Count numbers in ArrayList which are within certain range
body: <p>I'm adding several numbers that were entered by a user and adding them to array list.</p>
  
  <p>My code so far:</p>
  
  <pre><code>package project143;
  
  import java.util.*;
  
  /**
   * @author --
   */
  public class Histogram {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
  
          Scanner input = new Scanner(System.in);
  
          // Input for grades
          int mark = 0;
          List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();
          while (mark &gt;= 0 &amp;&amp; mark &lt;= 100) {
              System.out.println("Enter students mark:");
              mark = input.nextInt();
  
              if (mark &gt;= 0 &amp;&amp; mark &lt;= 100) {
                  list.add(mark);
              }
  
          }
          System.out.println(list);
      }
  }
  </code></pre>
  
  <p>Now, I need to count how many numbers from the <code>list</code> are within following ranges (0-29 , 30-39 , 40-69 , 70-100)</p>
  
  <p>Once I know how many numbers there are within each range, I need to display "<em>" next to each range, so for example there are 10 numbers within range of 0 - 29, therefore I need to display 10 stars (<strong></em>**<em>*</em></strong>).</p>
  
  <p>How can I achieve this?</p>