i'm trying to simply create a method that returns a 2D array that has all the values entered based off a given pattern. Eclipse says that my code doesn't have any errors, yet when I go to run I get the response "[[I@2a139a55". I googled it and learned what it was about, yet I still don't know how to fix my code.
public class Transpose {
public static int[][] createPatterned2DArray(int row,int column){
int width = column;
int height = row;
int[][] array = new int[height][width];
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
array[i][j] = i + j + (width * i);
}
}
return array;
}
public static void main(String[] args) {
System.out.print(createPatterned2DArray(3,5));
}
}