+ 2
I'm not understanding why this isn't working??
It is supposed to compare the input, and give output depending on the input! https://code.sololearn.com/cTTMVfkmCBRW/?ref=app
6 Respuestas
+ 2
https://code.sololearn.com/cmq3yZZk8n8R/?ref=app
Check this Calvin Capstone
See if you can understand
+ 4
A single equal assigns a value, double compares:
myVar == 100
Since this is one of the most common and additionally one of the best hidden coding bugs, I recommend to use constants (final modifier) as far as possible.
+ 3
Wrong assignment of scanner is in fact the first problem occurring 🙃
+ 2
ABHISHEK THANKS A LOT MAN
+ 1
Problem is here you haven't make scanner object
+ 1
// Scanner int myVar = new Scanner(System.in);
Scanner sc = new Scanner(System.in);
// System.out.println(myVar.nextLine());
int myVar = sc.nextInt();
System.out.println(myVar);
// if(myVar = 100){
if(myVar == 100){
// System.out.printIn("Good"); // typo In (IN) instead ln (LN)
System.out.println("Good");
}