title: Pretty sure I'm over complicating my loops but unsure how to simplify
body: <p>As the title says I just need some help/advice on how I can simplify a part of my code. I get the output I want but it's obvious to see that the way I go about it is a bit excessive. What I'm trying to do in my program is pass the array</p>
  
  <pre><code>int [] myInches = {89,12,33,7,72,42,76,49,69,85,61,23};
  </code></pre>
  
  <p>Into my <code>buildFeetArray</code> method which just takes the array elements, divides them by 12 to get a new element value which is then put in a new array which is returned. Here is the method</p>
  
  <pre><code> public static int[] buildFeetArray(int[] arrayParam) {
      int sum = 0;
      int lessthan1 = 0;
      int lessthan2 = 0;
      int lessthan3 = 0;
      int lessthan4 = 0;
      int lessthan5 = 0;
      int lessthan6 = 0;
      int lessthan7 = 0;
      int lessthan8 = 0;
      for (int count = 0; count &lt; arrayParam.length; count++) {
          if (arrayParam[count] / 12 == 0) {
              lessthan1++;
          } else if (arrayParam[count] / 12 == 1) {
              lessthan2++;
          } else if (arrayParam[count] / 12 == 2) {
              lessthan3++;
          } else if (arrayParam[count] / 12 == 3) {
              lessthan4++;
          } else if (arrayParam[count] / 12 == 4) {
              lessthan5++;
          } else if (arrayParam[count] / 12 == 5) {
              lessthan6++;
          } else if (arrayParam[count] / 12 == 6) {
              lessthan7++;
          } else if (arrayParam[count] / 12 == 7) {
              lessthan8++;
          }
      }
      int[] newArray = {lessthan1, lessthan2, lessthan3, lessthan4, lessthan5, lessthan6, lessthan7, lessthan8};
      return newArray;
  }
  </code></pre>
  
  <p>Ideally the output should be </p>
  
  <pre><code>int length = 8;
  [0] = 1;
  [1] = 2;
  [2] = 1;
  [3] = 1;
  [4] = 1;
  [5] = 2;
  [6] = 2;
  [7] = 2;
  </code></pre>
  
  <p>Which it is but there's definitely an easier way to go about it, if possible I'd like to avoid using lists and sticking with loops as I need practice with them. Thank you in advance for any advice/tips.</p>