From the code below, what value for userInput causes “The wh…

From the code below, what value for userInput causes “The while loop has finished” to be printed to the console?   Scanner sc = new Scanner(System.in);int userInput = sc.nextInt(); while (userInput < 5) {    // do something    userInput = sc.nextInt(); }//end while System.out.println("The while loop has finished");

Which condition XXXX will prompt the user to enter a value l…

Which condition XXXX will prompt the user to enter a value less than 15, until a value that is less than 15 is actually input?   int enteredValue;Scanner scanner = new Scanner(System.in); do {     System.out.println(“Enter a number less than 15:”);    enteredValue = scanner.nextInt(); } while XXXX