title: Finding the max value in and Array
body: <p>I have looked at other questions but not exactly the issue that I am facing here,
  This is the current code that I have</p>
  
  <pre><code>public class Qn3 {
      public static void displayHighestMark(String[] names,int[] marks, int count)
      {
          int mark = 0;
          int currentArrayPosition;
         for(int i=0;i &lt;= names.length;i++)
         {
  
            if(mark &lt;= marks[i])
                mark = marks[i];
            currentArrayPosition  = i;
         }
         System.out.println(name[i]+" with marks "+mark);
      }
  
      public static void main(String[] args)
      {
          String[] names = new String[]{"jack","hello","A","b","c","d"};// = new String[];
  
           int[] marks = new int[]{1,2,3,8,5,6};
          displayHighestMark(names,marks, 45);
      }
  
  }
  </code></pre>
  
  <p>So basically I am trying to find the highest mark in the marks array. But I am getting expection of ArrayIndexOutOfBoundsException</p>