Driver code
public static void main ( String [ ] args ) { int A [ ] = { 2 , 3 , 1 , 7 , 8 } ; int B [ ] = { 3 , 6 , 7 } ; int m = A . length ; int n = B . length ; System . out . print ( MaxDotProduct ( A , B , m , n ) ) ; } }