continue;//表示继续,当遇到continue语句时,则结束当次循环继续执行下一次循环 例子:
1 class For09{
2 public static void main(String[ ]args){
3 //输入5个人Java学生的考试成绩,统计成绩在95分以上的人数
4 Scanner input = new Scanner(System.in);
5 int count = 0;
6 for(int i = 1 ; i <=5 ; i ++){
7 System.out.print("请输入第"+ i +"个人的成绩:");
8 double score = input.nextDouble();
9 if(score <=95){
10 continue;
11 }
12 count++;
13 }
14 System.out.println("在95分以上的成绩的人数有:"+ count);
15 }
16 }
原文:https://www.cnblogs.com/penphy/p/10700478.html