For example, lets have a 2D array with size 4*4
int [][] test = {
{1,2,3,4},
{5,6,7,8},
{9,10,11,12},
{13,14,15,16},
};
Then how to pass the 2D array as above to an ArrayList
and then if i want to print out the 2D array data as the format above, how to do that ?
However, it would be great if someone provide clear explanation.