日期:2014-05-20 浏览次数:20643 次
package game.card; public class OneCards { private static String CardNumber[];/*这里提示有错误:;应该后面是{/ CardNumber=new String[15]; CardNumber[0]=new String("2"); CardNumber[1]=new String("3"); CardNumber[2]=new String("4"); CardNumber[3]=new String("5"); CardNumber[4]=new String("6"); CardNumber[5]=new String("7"); CardNumber[6]=new String("8"); CardNumber[7]=new String("9"); CardNumber[8]=new String("10"); CardNumber[9]=new String("J"); CardNumber[10]=new String("Q"); CardNumber[11]=new String("K"); CardNumber[12]=new String("A"); CardNumber[13]=new String("SmallKing"); CardNumber[14]=new String("BigKing"); public OneCards(){ } }
package game.card; public class OneCards { private static String CardNumber[]; public void setCard()//通过方法赋值 { CardNumber=new String[15]; CardNumber[0]=new String("2"); CardNumber[1]=new String("3"); CardNumber[2]=new String("4"); CardNumber[3]=new String("5"); CardNumber[4]=new String("6"); CardNumber[5]=new String("7"); CardNumber[6]=new String("8"); CardNumber[7]=new String("9"); CardNumber[8]=new String("10"); CardNumber[9]=new String("J"); CardNumber[10]=new String("Q"); CardNumber[11]=new String("K"); CardNumber[12]=new String("A"); CardNumber[13]=new String("SmallKing"); CardNumber[14]=new String("BigKing"); } public OneCards(){ } }
------解决方案--------------------
额。。。。难道你不知道12楼和14楼都是我?这20分可真难赚。。。