我需要多次问一个问题,直到得到所需的答案(大于2000)
System.out.println("please enter a preferred amount of trials (over 2000):");
in = new Scanner(System.in);
int minimumTrials = 2000;
int intValue = in.nextInt();
int randNum = 0;
Random randNumList = new Random();
if (minimumTrials > intValue)
System.out.println("sorry,the amount of trials must be 2000 or above");
我得到的结果是,只要我输入2000以上的值,文件就会停顿,我想要的结果将是第一个循环的问题