我的数组怎么引用不了?
有这样一个程序:
public class bijiao
{
static class Card
{
String value;
String color;
int num;
public Card(String color,String value,int num)
{
this.color=color;
this.value=value;
this.num=num;
}
}
static String[] colors={ "黑桃 ", "红桃 ", "梅花 ", "方块 "};
static String[] values= { "A ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "10 ", "J ", "Q ", "K "};
static int[] nums={12,13,1,2,3,4,5,6,7,8,9,10,11};
public static void main(String arg[])
{
Card porke[]=new Card[52];int k=0;
System.out.println( "未洗牌前,牌的顺序为: ");
System.out.println();
for(int i=0;i <=3;i++)
{
for(int j=0;j <13;j++,k++)
{
porke[k]=new Card(colors[i],values[j],nums[j]);
System.out.print(porke[k].color+porke[k].value+ " ");
}
}
int a[]=new int[52];
for (int p=0;p <a.length;p++)
{
a[p]=(int)(Math.random()*52);
for(int q=0;q <p;q++)
if(a[q]==a[p])