Whenever I run the program, everything works fine but for some reason the Confirmation prints are happening twice and I can't figure out why. Any help would be appreciated.
public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String Z = "Z";
        int number;
        String Znumber = "";
        String Confirmation = "";
        int ExamType;
        // Ask user for Z number
        do {
            System.out.println("Please enter your Z number. Example: 12345678");
            number = input.nextInt();
            Znumber = Z + number;
        } while ((Znumber.length() != 9));
        //Confirm Z number entry
        do {
            System.out.printf(
                    "Your Z number is: %s. Is this correct? Enter Y/N: \n",
                    Znumber);
            Confirmation = input.nextLine();
        } while (!Confirmation.equalsIgnoreCase("y"));
        // Ask user which exam they would like to take
        ExamType = 0;
        Confirmation = "";
        System.out.println("Which exam would you like to take? Select 1-3: ");
        System.out.println("1: English");
        System.out.println("2: Spanish");
        System.out.println("3: Math");
        ExamType = input.nextInt();
        do {
            System.out.printf("You selected %s. Are you sure? Enter Y/N: \n",
                    ExamType);
            Confirmation = input.nextLine();
        } while (!Confirmation.equalsIgnoreCase("y"));
        // Begin exam
        if (ExamType == 1) {
            System.out.println("Welcome to the English exam!");
            // Start code from JavaExam.java
        } else if (ExamType == 2) {
            System.out.println("Welcome to the Spanish exam!");
            // Start code from MathExam.java
        } else if (ExamType == 3) {
            System.out.println("Welcome to the Math exam!");
            // Start code from EnglishExam.java
 
     
     
     
    