Scanner in Java not working
问题 I'm trying to write a very simple number guessing game (code is below). After 1 round is finished, the user is supposed to be able to decide whether he/she wants to play another round or not. Problem is, the program always skips the last question (never letting the user answer 'y' or otherwise. What am I missing here? Is there something about java.util.Scanner I don't know about? import java.util.Random; import java.util.Scanner; public class GuessNum { public GuessNum() { int numRandom = 0;