I am getting input from Scanner and system.in and I want to get the enter from output. I have a loop as while(keyboard.hasnext()) do something. But when I hit enter it doesn’t get anything and after that it doesn’t get any input too but the program is still running. So I am stuck in this loop. Help me out guys.
Share
1 Answer