Persue2019
2017-09-11 11:58循环体我被转晕了。。break换一下位置答案不一样关键我还搞不清
public class Ex1_4_1 {
public static void main(String[] args){
for(int i=1;i<=4;i++)
switch(i) {
case 1: System.out.print("a");
case 2: System.out.print("b");
case 3: System.out.print("c");break;
case 4: System.out.print("d");break;
}
}
}
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- python 中,将lambda函数放进列表,指定访问和循环访问不一样。
- python
- 2个回答
- 麻烦问下我的这段代码为什么运行结果跟我想的不一样,求指导?
- python
- 1个回答
- 为什么我的for循环功能不像我期望的那样? [关闭]
- for-loop
- floating-accuracy
- php
- 2个回答
- 我的代码运行后只输出6=,之后的循环都不做了。是因为什么呢?
- 循环嵌套
- c++
- 完全数
- 2个回答
- 我的循环中的数据不匹配,不确定原因
- loops
- mysql
- if-statement
- php
- 1个回答
换一换