Driver function .
public static void main ( String [ ] args ) { int arr1 [ ] = { 23 , 45 , 34 , 78 , 12 , 76 , 34 } ; int arr2 [ ] = { 65 , 67 , 34 , 23 , 45 } ; int n = arr1 . length ; int m = arr2 . length ;