In: Computer Science
Write a program which shows how two-dimensional arrays which contain multiple copies of your id number and age are passed to methods. Explain in your own words each method and class used in the program.
public class Main
{
public static void main(String[] args) {
int[][]
array={{1,2,3,4,5},{10,20,30,40,50}};
parameter(array);
}
static void parameter(int[][] array)
{
System.out.println("ID \t AGE");
for(int i=0;i<array[0].length;i++)
{
System.out.println(array[0][i]+"\t"+array[1][i]);
}
}
}