[Solved] Why am I getting run time error for the following code when I submit on an online judge? [closed]

[ad_1]

You are calling nextInt() without checking that there is an int to read.

Probably that online test feeds non numbers to your program.

You should call hasNextInt() before.

0

[ad_2]

solved Why am I getting run time error for the following code when I submit on an online judge? [closed]