subject

Find and fix the error in the if-else statement. import java. util. Scanner;

public class NumberChecker {
public static void main (String [] args) {
int userNum;

Scanner scnr = new Scanner(System. in);
userNum = scnr. nextInt(); // Program will be tested with values: 0, 1, 2, 3.

if (userNum = 2) {
System. out. println("Num is equal to two");
}
else {
System. out. println("Num is not two");
}

}
}

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, relic7391
Is a string of code written to hurt others by damaging or destroying
Answers: 1
image
Computers and Technology, 22.06.2019 11:30, LindseyN1
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
image
Computers and Technology, 22.06.2019 18:10, AdoNice
How can i delete permalinks from a word press site?
Answers: 1
image
Computers and Technology, 22.06.2019 19:10, kaiya789
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
You know the right answer?
Find and fix the error in the if-else statement. import java. util. Scanner;

public clas...

Questions in other subjects:

Konu
History, 21.07.2019 13:00
Konu
Mathematics, 21.07.2019 13:00
Konu
Mathematics, 21.07.2019 13:00