0
public int[][] updateGame(String[] inarr, int c) {

  int[][] userGuess = new int[10][4];

  for (int i = 0; i < c; i++) {
    for (int j = 0; j <= 3; j++) {
      userGuess[i][j] = Integer.parseInt(inarr[j]);


      System.out.println("user guess in for loop: " + userGuess[i][j]);

      //return userGuess[i][j];
    }

  }

  //System.out.println("user guess in method:"+userGuess);

  return userGuess;

}

it only returns the address of array

Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588

0 Answers0