import java.util.*;
public class ListofArrays {
public static void main(String []args)
{
List<Integer[]> list;
list = new ArrayList<Integer[]>();
// Let us create 2 arrays of type Integer
Integer [] arr1 = new Integer[5];
Integer [] arr2 = new Integer[5];
//arr1 stores numbers from 0 to 4
//arr2 stores the numbers from 5 to 9
for(int i=0;i<5;i++)
{
arr1[i] = i;
}
for(int i=0;i<5;i++)
{
arr2[i] = i+5;
}
//adding both arrays to list
list.add(arr1);
list.add(arr2);
//print elements of the list
for(int i=0;i<list.size();i++)
{
Integer [] arr = list.get(i);
for(int j=0;j<arr.length;j++)
{
System.out.print(arr[j]+ " ");
}
System.out.println();
}
}
}
List<int[]> A = new List<int[]>();
List<Object[]> list = new ArrayList<>();
list.add(new String[5]);
list.add(new Integer[5]);
Object[] objects = list.get(0);