public class Main{
public static void main(String args[]){
int ar1 [] = {1,2,3,4,5};
int ar2 [] = {6,7,8,9,0};
int arr [][] = {ar1, ar2};
System.out.println(arr[0][1]);
System.out.println(arr[1][2]);
try{
System.out.println(arr[2][0]);
}
catch (IndexOutOfBoundsException e){
System.out.println(e + " -> Index doesnt exist");
}
}
}