Question: Re type the following code and fix any errors. The code should check if userNum is 2. if (userNum = 2) { System.out.println(Num is two);
Re type the following code and fix any errors. The code should check if userNum is 2.
if (userNum = 2) {
System.out.println("Num is two");
}
else {
System.out.println("Num is not two");
}

Please post in Java
1 import java util Scanner 3 p class D ublic etectT 4 public static void main (String [J args int userNum 03 userNum 2; Your solution goes here 10 return; 12 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
