I am trying to figure out how to read input from the console in Java that would behave exactly the same as the following C++ code:
while(cin >> input)
I essentially need to keep reading the console one integer at a time, and only stop when the user enters no more integers.I am able to read integers one at a time, but cannot figure out how to get it to stop executing once the user passes an empty line. Thanks!