Ich habe ein 2D-Array, und ich will es zB in String konvertierenConvert int [] [] zu String
Ich möchte int[][] p
-String
konvertieren und ich verwende toString
aber scheitern.
int [][] p = new int[9][9];
for(int i = 0;i<9;i++) {
for(int j = 0;j<9;j++){
p[i][j] = 1;
}
}
String str="";
for(int i = 0; i< 9; i++) {
for(int j = 0; j< 9; j++)
{
str+=p[i][j].toString +" ";
}
}
'Arrays.deepToString (p);' –
'Arrays.deepToString (p)'. –
@EliottFrisch jinx. Fast genau im selben Moment. –