Program Runs Continually, but never actually executes anything
<p>I run the program, but none of my lines execute. When I tell it to stop it prints a red error message.</p>

<pre><code>Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
</code></pre>

<p>Here's my code, nothing really seems to be out of the ordinary to my limited experience and my IDE doesn't report any errors while I'm writing it.</p>

<pre><code>import java.util.Scanner;

public class 312easf2 
{

    public static void main(String[] args) 
    {
        Scanner keyboard = new Scanner(System.in);
        int grade = 0;  // initial value to satify loop condition
        double averageGrade = 0.0;
        int max = keyboard.nextInt();
        int min = max;
        int next = keyboard.nextInt();

        System.out.println("Enter a nonnegative integer (negative to stop): ");

        while(next &gt;= 0);
        {
            if(next &gt; max)
                max = next;
            else if(next &lt; min);
                min = next;
            next = keyboard.nextInt();
        }
    }

}
</code></pre>
