要使用 Oop 不使用arraylist
求指点代码
/**
* 产生一副扑克牌
* 扑克牌 ==数字+ 花色
*/
public class puke {
public static void main(String[] args) {
//定义数字
String[] nums = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"};
//定义花色
String[] color = {"♠", "♥", "♣", "♦",};
for (int i = 0; i < nums.length; i++) {
for (int j = 0; j < color.length; j++) {
String poker = nums[i] + color[j];
System.out.printf( "%10s",poker);
}
System.out.println();
}
}
}