标签:
package com.mufeng.thefourthchapter; public class BreakAndContinue { public static void main(String[] args) { for (int i = 0; i < 100; i++) { if (i == 74) {// Out of for loop break; } if (i % 9 != 0) {// Next iteration continue; } System.out.print(i + " "); } System.out.println(); int i = 0; while (true) { i++; int j = i * 27; if (j == 1269) {// Out of loop break; } if (i % 10 != 0) {// Top of loop continue; } System.out.print(i + " "); } } }
0 9 18 27 36 45 54 63 72 10 20 30 40
标签:
原文地址:http://blog.csdn.net/u013693649/article/details/51689127