New course! Every coder should learn Generative AI!
Try a free lesson+ 11
Plz tell what are the errors in the following program
5 Answers
+ 5
Line 6:
Scanner sc = new Scanner(System.in);
Notice I removed the space after `System.in`
Please tag Java only, no need to tag `importjava.util.*;class` โ
Edit:
Code has been updated
Tags have been updated ๐๐๐
+ 7
Thanq Ipang I didn't noticed that.....thanq so much brother๐ค
+ 6
Martin Taylor I tried compiling the program after removing the space...nd by using '%' instead of '/' ......nd it gave the correct output......thnks for ur answer...
+ 3
You're welcome ๐
I also wonder why that one space should cause a problem. I thought it'd be ignored instead. Hope someone who knows why can answer here ...
+ 1
I guess only issue in SoloLearn..