I gave array input successfully but after that i was unable to give further inputs.
After taking input from Array Utility Input function, I am constantly getting this exception. In the above program I am taking input of an array using Array Utility class and when I try to take input in my current class after using input function from array utility. I am getting the following exception :
Enter the target element you want to search : Exception in thread “main” java. util. No Such Element Exception
at java. util. Scanner. throw For(Unknown Source)
at java .util. Scanner. next(Unknown Source)
at java. util. Scanner. next Int(Unknown Source)
at java. util. Scanner. next Int(Unknown Source)
I am unable to give more inputs further?? What’s wrong with this code ??
I gave array input successfully but after that i was unable to give further inputs.
Mitesh Godne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3