Page 1 of 1

Please solve it ASAP it's urgent.

Posted: Wed Mar 30, 2022 9:28 am
by answerhappygod
Please solve it ASAP
it's urgent.
Please Solve It Asap It S Urgent 1
Please Solve It Asap It S Urgent 1 (53.62 KiB) Viewed 27 times
Write a complete Java program that provides a method named subtractPairs() that takes any array of integers as a parameter, replaces every 2 consecutive elements (starting from the right) with their difference and returns the array containing the sum values only. Assume number of elements is always even. Sample Output: Before: Left[5, 6, 6, 3, 3, 2, 2, 1]right After: Left[-1, -3, -1, -1]right Array size and elements should be read from the user.