小编die*_*zin的帖子

得到堆栈溢出错误,我不确定为什么

编辑:

主要方法......

创造一个新的球员.

球员班......

创建一个手的实例.

手班......

创造一个arraylist

就这样.它非常简单

public class Player 
{
/*------------------------
 * instantiating variable
 -----------------------*/
protected Hand hand;
protected boolean active = false;

/*------------
 * constructor
 -----------*/
    public Player()
{
    hand = new Hand();
    hand.setSize(5);
}



public class Hand extends Player
    {
/*-----------------------------------------
 * variable declaration
 ----------------------------------------*/
ArrayList <Card> hand;
protected int size;
Card temp;

     /*------------------------------------------
 * constructor
 * creates arraylist of cards to keep in hand
 ------------------------------------------*/
public Hand()
{
    hand = new ArrayList<Card>();
}

/*-------------------------------
 * …
Run Code Online (Sandbox Code Playgroud)

java stack-overflow

0
推荐指数
1
解决办法
65
查看次数

标签 统计

java ×1

stack-overflow ×1