title: Check if user input anything before pressing enter
body: <p>I am doing a basic java console application and I want to check if the user provided any input before pressing enter. I'm using the Scanner class to get the input. Right now all I get is that the application just waits for input whenever I press enter without typing in anything. </p>