+ 2
Pls tell me why it is showing errorr
4 Answers
+ 1
It's due to sololearn, how it handles input. You need to give all required input at once on pop up by line by line or space separated according to code.
Give input to your code like
Ex:
string <press enter>
1 <press submit>
edit:
Ryomen Sukuna
Run this and see how sololearn input works.. this explains how solo learn input console works...
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
+ 2
What error you are facing?
+ 2
Jayakrishna🇮🇳
Enter a no.
Enter your choice:
Exception in thread "main" java.util.NoSuchElementException
at java.base/
java.util.Scanner.throwFor (Scanner.java:937)
at java.base/
java.util.Scanner.next(Scanner.java:1594) java.util.Scanner.nextInt(Scanner.java:2258)
at java.base/
at java.base/
java.util.Scanner.nextInt(Scanner.java:2212)
at Program.main(Program.java:11)
It is showing this 😑
+ 2
Thank you sooo mucccchhhh Jayakrishna🇮🇳 sir 🥰