Driver code
public static void main ( String [ ] args ) { int A [ ] = new int [ ] { 1 , 2 , 3 , 4 , 5 } ; int B [ ] = new int [ ] { 5 , 4 , 3 , 2 , 1 } ; int X = 3 , Y = 2 ; int N = A . length ; System . out . println ( maximumSum ( A , B , N , X , Y ) ) ; } }