Why this error is coming. In Max Value in Array

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:5)

@udaichauhan284,
https://ide.codingblocks.com/s/253263 you were not printing your answer. Your code is correct. Should submit. Please respond to this thread in case you face problem during submission of code.

still same problem is coming. after printing the answer

@udaichauhan284,

Please drop an email to [email protected] regarding your problem

yeah okay. I got the answer. Thank you.

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.