For my Computer Science lab, I have to make a method that returns a string:
public static String arrayToString(int  a)
a is a two dimensional integer array. The string has to separate each index with a space, and a new line after every row (\n). The rows can't have a space before or after the last value on the row, and the columns can't have a new line before or after the last column. How can I do this? I know it involves a nested for loop but I can't figure out how to code it. Thanks in advance!