IndexOutOfBoundsException error

后端 未结 4 846
栀梦
栀梦 2021-01-29 10:53
public void thisisnotworking()
{
    Scanner input=new Scanner(System.in);
    String cardA;
    String cardB;
    System.out.print(\"Enter Card: \"); cardA=input.nextLi         


        
4条回答
  •  囚心锁ツ
    2021-01-29 11:27

    Where do you set the cards into the game? If there is no code missing that might be it, you need to call

    game.set(cardA); 
    game.set(cardB);
    

    before game.get(...);

提交回复
热议问题