Scanner input = new Scanner(System.in);
System.out.print("请输入数字: ");
do
{while(!reader.hasNextInt())
{
System.out.println("请输入一个1-9999之间的整数:");
reader.next();
}
input =reader.nextInt();
if(input
Scanner input = new Scanner(System.in);
System.out.print("请输入数字: ");
do
{while(!reader.hasNextInt())
{
System.out.println("请输入一个1-9999之间的整数:");
reader.next();
}
input =reader.nextInt();
if(input