1 Star 0 Fork 0

Java45_张奭/Java第十二章作业

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CardGame6.java 756 Bytes
一键复制 编辑 原始数据 按行查看 历史
package cn.jbit.classandobject;
public class CardGame6 {
String[] colors = {"方片","红桃","黑桃","梅花","小王","大王"};
String[] strs = {"2","3","4","5","6","7","8","9","10","J","Q","K","A","X","D",};
String color;
String test;
int num;
public void run(){
for (int i = 0; i < 13; i++) {
for (int j = 0; j < 4; j++) {
color = colors[j];
test = strs[i];
num = i;
System.out.println(color+" "+test);
}
}
color = colors[4];
test = strs[13];
num = 14;
System.out.println(color+" "+test);
color = colors[5];
test = strs[14];
num = 15;
System.out.println(color+" "+test);
}
public static void main(String[] args) {
CardGame6 card = new CardGame6();
card.run();
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangshi66/JavaDiShiErZhangZuoYe.git
[email protected]:zhangshi66/JavaDiShiErZhangZuoYe.git
zhangshi66
JavaDiShiErZhangZuoYe
Java第十二章作业
master

搜索帮助