编译错误“无法找到符号”

时间:2016-09-18 04:44:59

标签: java

import java.util.Random;

public class Card
{
   //instance data
   private String card,suit,x;
   private int value,y;
   private static Random generator=new Random();
   //constructor
   public Card(String cards, String suits,String xs, int values, int ys)
   {
      card=cards;
      suit=suits;
      x=xs;
      value=values;
      y=ys;
   }

//no errors here
   public String card_Face;
   {
      String[] x={"Ace", "Jack", "King", "Queen", "Diamonds", "Spades", "Clubs", "Hearts"};
   }
//no errors here
   public int vals;
   {
      int[] y={1,10,11,12,13};
   }

   //this is where the problem is
   public String random()
   {
      suit = generator.nextLine(card_Face);
      return suit;
   }
}

我在底部有一个编译错误,上面写着suit = generator.nextLine(card_Face);而程序却说无法找到符号。有什么帮助吗?

0 个答案:

没有答案