With just a bit more programming you can prevent this.
Read the user's input into a String and test if the String is empty. If it is ask the user to enter again.
If you want to force the user to...