Driver Code
public static void main ( String [ ] args ) { int a [ ] = { - 2 , 6 , - 2 , - 5 } ; int b [ ] = { - 3 , 4 , - 2 , 8 } ; int n = a . length ; int m = b . length ; System . out . print ( maxProduct ( a , n , b , m ) ) ; } }