Error shown not understood

even after adding java.util.Scanner it show this error

Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at Main.main(Main.java:6)

not understood??why this happens and how to solve?

@HemantNasa,
Can you please share your code with me?

Hint:
In the given pattern if row number is n (>1), total character is n. First and last character is n-1 and rest are 0.

Sure I have sent it in chat box

@HemantNasa,
Your code is correct. You should not be facing such errors. Please mail about your problem to [email protected]. There might be a technical glitch in the servers.

okay Thanks!! I will mail

for the next question also I’m not able to submit.Same error shows… but my code runs on eclipse

Error solved… Thanks By the way : )

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.