Question: Write an expression that will cause the following code to print less than-15 if the value of userNum is less than -15 1 import java.util.Scanner:
Write an expression that will cause the following code to print "less than-15 if the value of userNum is less than -15 1 import java.util.Scanner: 2 3 public class NumberChecker public static void main (String[] args) int userNum; Scanner sehr = new Scanner(System.in); I 8 userNum scnr.nextInt(); // Program will be tested with values: -14, 15, 16, 17 if (userNum= 15) 11 System.out.println("less than -15"); 12 > 13 eise 14 system.out.printin("-15 or more" 15 16 4 5 6 7 9 10 17
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
