开发者

Call to pop failing in my java code

public void CardToPile开发者_Go百科() {
    waste.push(reserve.pop);
}


public void CardToPile() {
        waste.push(reserve.pop()); //Here is the error
    }

You need to add the parens in order to call the method.


If by "not working" you mean that it does not compile, it might be because your call to reserve.pop seems incorrect. You might have meant reserve.pop().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜