After the programs reads the exception it stops. 

A need a little help on how to make it continue to the beginning of the loop. 

I tried the continue statement but it did not work or maybe my mistake.

```
package labexer5a;
import java.util.*;

public class LabExer5A {

    public static void main(String[] args) {
        int max = 50;
        int min = 1;

        int secretNumber;
        secretNumber = (int)(Math.random() * 49 + 1);

        Scanner keyboard = new Scanner(System.in);
        int guess;
        int count = 0;
        try{
            do{
                System.out.println("Guess a number from 1 to 50");
                guess = keyboard.nextInt();
                count ++;

                if(guess == secretNumber){
                    if(count> 1){
                    System.out.println("You got it in " + count + " attempt(s)");
                    }
                    else{
                        System.out.println("You got it in " + count + " attempt");
                    }
                }
                else if(guess > max){
                    System.out.println("Out of Range");
                }
                else if(guess < min){
                    System.out.println("Out of Range");
                }
                else if(guess > secretNumber){
                    System.out.println("Too High. Try Again");
                }
                else if(guess < secretNumber){
                    System.out.println("Too Low. Try Again");
                }                
            }
            while(guess != secretNumber);
        }

        catch(InputMismatchException e){           
            System.out.println("Invalid Input");            
        }    
    }    
}

```