title: Calculate max Height of array
body: <p>I'm calculating the <code>max</code> height that is inserted in the applications, and it gives me a <code>ArrayIndexOutOfBound</code> error, the time of values inserted is the same of the length of the array including the 0 index, but i am still having this error.</p>
  
  <pre><code>int nrPersons = 3;
  double[] height = new double[nrPersons];
  double maxHeig = 0;
  
  for (int i = 0; i &lt;= nrPersons; i++) {
      Scanner in = new Scanner(System.in);
      in.useLocale(Locale.US);
  
      System.out.println("Insert Height");
  
      height[i] = in.nextDouble();
  
      if (height[i]&gt; maxHeig)
          maxHeig = height[i];
  
  }
  
  System.out.println("The max Height is: "+maxHeig);
  </code></pre>