package assignmentSeven;

import java.util.InputMismatchException;
import java.util.Scanner;

public class QuestionThree {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int num;
        try {
            System.out.print("Please enter an integer: ");
            num = input.nextInt();
            System.out.println("\n" + num + " is a lovely choice!");
        } catch (InputMismatchException e) {
            System.out.println("\nThat wasn't a valid integer");
        } catch (Exception e) {
            System.out.println("\nUnknown error occured");
        } finally {
            input.close();
        }
    }
}