最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Unresolved compilation problem結(jié)果為什么樹上是輸出三次,我只想到輸出一次??!

Unresolved compilation problem結(jié)果為什么樹上是輸出三次,我只想到輸出一次??!

Rogerl 2015-07-22 17:58:45
public class aa { public static void playGame(GameFactory factory) { Game s = factory.getGame(); while (s.move()) ; } interface Game { boolean move(); } interface GameFactory { Game getGame(); } class Checkers implements Game { private int moves = 0; private static final int MOVES = 4; public boolean move() { print("Checkers moves " + moves); return ++moves != MOVES; } } class CheckersFactory implements GameFactory { public Game getGame() { return new Checkers();} } private void print(String string) { // TODO Auto-generated method stub print(string); } public static void main(String[] args) { playGame(new CheckersFactory());//這行出錯(cuò)了 }}
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1831 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)