求大神指点 0.0
public class SetTest {
public List<Squeezer>squeezersToSelect;
public SetTest(){
squeezersToSelect=new ArrayList<Squeezer>();
}
public void testAdd(){
System.out.println("--------创建扑克牌。。。----------");
Squeezer Sz1=new Squeezer("黑桃2 ");
squeezersToSelect.add(Sz1);
Squeezer Sz2=new Squeezer("黑桃3 ");
squeezersToSelect.add(Sz2);
Squeezer Sz3=new Squeezer("黑桃4 ");
squeezersToSelect.add(Sz3);
Squeezer Sz4=new Squeezer("黑桃5 ");
squeezersToSelect.add(Sz4);
Squeezer Sz5=new Squeezer("黑桃6 ");
squeezersToSelect.add(Sz5);
Squeezer Sz6=new Squeezer("黑桃7 ");
squeezersToSelect.add(Sz6);
Squeezer Sz7=new Squeezer("黑桃8 ");
squeezersToSelect.add(Sz7);
Squeezer Sz8=new Squeezer("黑桃9 ");
squeezersToSelect.add(Sz8);
Squeezer Sz9=new Squeezer("黑桃10 ");
squeezersToSelect.add(Sz9);
Squeezer Sz10=new Squeezer("黑桃J ");
squeezersToSelect.add(Sz10);
Squeezer Sz11=new Squeezer("黑桃Q ");
squeezersToSelect.add(Sz11);
Squeezer Sz12=new Squeezer("黑桃K ");
squeezersToSelect.add(Sz12);
Squeezer Sz13=new Squeezer("黑桃A ");
squeezersToSelect.add(Sz13);
Squeezer Sz14=new Squeezer("红桃 2 ");
squeezersToSelect.add(Sz14);
Squeezer Sz15=new Squeezer("红桃3 ");
squeezersToSelect.add(Sz15);
Squeezer Sz16=new Squeezer("红桃4 ");
squeezersToSelect.add(Sz16);
Squeezer Sz17=new Squeezer("红桃5 ");
squeezersToSelect.add(Sz17);
Squeezer Sz18=new Squeezer("红桃6 ");
squeezersToSelect.add(Sz18);
Squeezer Sz19=new Squeezer("红桃7 ");
squeezersToSelect.add(Sz19);
Squeezer Sz20=new Squeezer("红桃8 ");
squeezersToSelect.add(Sz20);
Squeezer Sz21=new Squeezer("红桃9 ");
squeezersToSelect.add(Sz21);
Squeezer Sz22=new Squeezer("红桃10 ");
squeezersToSelect.add(Sz22);
Squeezer Sz23=new Squeezer("红桃J ");
squeezersToSelect.add(Sz23);
Squeezer Sz24=new Squeezer("红桃Q ");
squeezersToSelect.add(Sz24);
Squeezer Sz25=new Squeezer("红桃K ");
squeezersToSelect.add(Sz25);
Squeezer Sz26=new Squeezer("红桃A ");
squeezersToSelect.add(Sz26);
Squeezer Sz27=new Squeezer("梅花2 ");
squeezersToSelect.add(Sz27);
Squeezer Sz28=new Squeezer("梅花3 ");
squeezersToSelect.add(Sz28);
Squeezer Sz29=new Squeezer("梅花4 ");
squeezersToSelect.add(Sz29);
Squeezer Sz30=new Squeezer("梅花5 ");
squeezersToSelect.add(Sz30);
Squeezer Sz31=new Squeezer("梅花6 ");
squeezersToSelect.add(Sz31);
Squeezer Sz32=new Squeezer("梅花7 ");
squeezersToSelect.add(Sz32);
Squeezer Sz33=new Squeezer("梅花8 ");
squeezersToSelect.add(Sz33);
Squeezer Sz34=new Squeezer("梅花9 ");
squeezersToSelect.add(Sz34);
Squeezer Sz35=new Squeezer("梅花10 ");
squeezersToSelect.add(Sz35);
Squeezer Sz36=new Squeezer("梅花J ");
squeezersToSelect.add(Sz36);
Squeezer Sz37=new Squeezer("梅花Q ");
squeezersToSelect.add(Sz37);
Squeezer Sz38=new Squeezer("梅花K ");
squeezersToSelect.add(Sz38);
Squeezer Sz39=new Squeezer("梅花A ");
squeezersToSelect.add(Sz39);
Squeezer Sz40=new Squeezer("方片2 ");
squeezersToSelect.add(Sz40);
Squeezer Sz41=new Squeezer("方片3 ");
squeezersToSelect.add(Sz41);
Squeezer Sz42=new Squeezer("方片4 ");
squeezersToSelect.add(Sz42);
Squeezer Sz43=new Squeezer("方片5 ");
squeezersToSelect.add(Sz43);
Squeezer Sz44=new Squeezer("方片6 ");
squeezersToSelect.add(Sz44);
Squeezer Sz45=new Squeezer("方片7 ");
squeezersToSelect.add(Sz45);
Squeezer Sz46=new Squeezer("方片8 ");
squeezersToSelect.add(Sz46);
Squeezer Sz47=new Squeezer("方片9 ");
squeezersToSelect.add(Sz47);
Squeezer Sz48=new Squeezer("方片10 ");
squeezersToSelect.add(Sz48);
Squeezer Sz49=new Squeezer("方片J ");
squeezersToSelect.add(Sz49);
Squeezer Sz50=new Squeezer("方片Q ");
squeezersToSelect.add(Sz50);
Squeezer Sz51=new Squeezer("方片K ");
squeezersToSelect.add(Sz51);
Squeezer Sz52=new Squeezer("方片A ");
squeezersToSelect.add(Sz52);
}
public void testForEach(){
System.out.println("-------扑克牌创建成功!-------");
List<String> squeezersToSelect=new ArrayList<String>();
Collections.shuffle(squeezersToSelect);
for(String Sz:squeezersToSelect){
System.out.print(squeezersToSelect);
}
}
public static void main(String[] args) {
SetTest st=new SetTest();
st.testAdd();
st.testForEach();
}
}
为什么我这段代码输出不了打乱顺后的扑克牌啊?