display grade lowest and highest
<p>How do I display the highest and lowest average grade?
I tried other solutions but it's not working </p>

<p>Can you help how to display the highest average grade and the lowest average </p>

<pre><code>public static void main(String[] args)
{
    Scanner console = new Scanner (System.in);
    int numStud, numGrade = 0, count = 0, count2 = 0;

    double totalgrades = 0;

    System.out.println("Enter number of students:");
    numStud = console.nextInt();
    System.out.println("Enter number of student grades:");
    numGrade = console.nextInt();
    String[] students = new String [numStud];
    double [][] grades = new double [numStud][numGrade];
    double[] average = new double[numStud];
    String x = console.nextLine();

    System.out.println("");
    while(count&lt;numStud)
    {
        System.out.println("Enter name of student " + (count + 1) + ":");
        students[count] = console.nextLine();
        System.out.println("Enter " + numGrade + " grades:");
        while(count2&lt;numGrade)
        {
            grades[count][count2] = console.nextDouble();
            totalgrades = totalgrades + grades [count][count2];
            count2++;

        }
        average[count] = totalgrades / numGrade;
        totalgrades = 0;
        String y = console.nextLine();
        count2 = 0;
        count++;



}
count = 0;
count2 = 0;
while(count&lt;numStud)
{
    System.out.println("The grades of " + students[count] + " are:");
    while(count2&lt;numGrade)
    {
        System.out.println(grades[count][count2] + " ");
        count2++;
    }
    System.out.println("The average is " + average[count] + ".");
    System.out.println("");
    count2 = 0;
    count++;        
}
</code></pre>