Help with figuring out the output
Hey, the following string method does exactly what I been asked to do, but the problem is that I need to adapt it exactly as written on a tester class, that suppose to check my outputs against the outputs on the tester.
Although the task does the same if it is not equal it won't pass.
Should be equal to this:
String = "222\t147\t183\n251\t249\t195\n2\t253\t254\n";
This is the code I wrote:
public String toString (){
String result ="";
for (int row=0; row<arrayS.length; row++) {
for (int column=0; column<arrayS[row].length; column++){
result = result + arrayS [row] [column] +"\t";
}
result = result + "\n";
}
return result;
}
// Thank you very much for helping.