资讯

Use conditional logic to check if the guess matches the magic number. Accept user input to make the game interactive. Add a loop so the game continues until the correct number is guessed. By the end, ...
A program inputs its data from the standard input device by calling Java’s System.in.read() method. Look in the SDK documentation and you’ll discover a class called System.