如题所述
写continue;
continue是表示结束本次循环,继续下一次循环。
break表示结束整个循环,继续执行循环后面的代码。
continue是表示结束本次循环,继续下一次循环。
break表示结束整个循环,继续执行循环后面的代码。
温馨提示:答案为网友推荐,仅供参考
第1个回答 2015-05-22
/*
* for me, this is a time, in which never write java code.
* e-mail:qinchuanqing918@sina.com
* data:2015/5/22
* author:qcq
* */
package com.nokia;
public class MapIter {
public static void main(String[] args) {
int counter = 0;
while(counter++ <= 100){
if (0 == counter % 2){
continue;
} else {
System.out.print(counter + ",");
}
}
}
}本回答被网友采纳
* for me, this is a time, in which never write java code.
* e-mail:qinchuanqing918@sina.com
* data:2015/5/22
* author:qcq
* */
package com.nokia;
public class MapIter {
public static void main(String[] args) {
int counter = 0;
while(counter++ <= 100){
if (0 == counter % 2){
continue;
} else {
System.out.print(counter + ",");
}
}
}
}本回答被网友采纳
第2个回答 2015-05-22
写continue