Question: Write an expression that will cause the following code to print greater than -10 if the value of userNum is greater than -10. 1

Write an expression that will cause the following code to print "greater 

Write an expression that will cause the following code to print "greater than -10" if the value of userNum is greater than -10. 1 import java.util.Scanner; 2 4957WNHOSWNT 3 public class NumberChecker { 4 6 8 FO 10 11 12 13 14 15 16 17 } 18 public static void main (String [] args) { int userNum; Scanner scnr = new Scanner(System.in); userNum = scnr.nextInt (); // Program will be tested with values: -8, -9, -10, -11. if (* Your solution goes here */) { System.out.println("greater than -10"); } else { } System.out.println("-10 or less");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!