Driver Code to test above method
public static void main ( String [ ] args ) { int A [ ] = { 0 , 1 , 2 , 3 , 0 , 1 , 4 } ; int B [ ] = { 9 , 8 , 1 , 2 , 3 , 4 , 5 } ; int n = A . length ; System . out . println ( returnMaxSum ( A , B , n ) ) ; } }