Page 1 of 1

Write a complete Java program that provides a method named sumPairs() that takes any array of integers as a parameter, r

Posted: Wed Mar 30, 2022 9:28 am
by answerhappygod
Write a complete Java program that provides a method
named sumPairs() that takes any array of
integers as a parameter, replaces every 2 consecutive elements
(starting from the left) with their sum and returns the
array containing the sum values only. Assume number of elements is
always even.