I have tried this
public static void main(String[] args) throws ArrayIndexOutOfBoundsException
{
int arr1[]= {1,2,3,4,5};
int arr2[]= {6,7};
for(int i=0;i<arr1.length;i++)
{
System.out.println(arr1[i]);
System.out.println(arr2[i]);
}
}
but this does not work.