0
How can I take user integer input separated by space in Java
Here is the question : 4 1 2 2 4 3 5 5 6 The program should take 4 test cases, each test case should accept two integers separated by space . Please help me with the code I have been trying from past hour .
2 Answers
+ 3
Share your try here pls....
+ 2
You can use the nextInt() method of the Scanner class.
Example:
https://code.sololearn.com/cQgAclDLLxoY/?ref=app