Question: Write a method max_integer that takes two arrays of positive integers as arguments and returns the maximum integer found in both arrays. If not duplicates
Write a method max_integer that takes two arrays of positive integers as arguments and returns the maximum integer found in both arrays. If not duplicates are found it returns -1. For example: [2,4,6,8,10,12,14] [7,7,5,4] => 4
[2,4,6,8] [3,5,7] => -1
[7,6,22,4,4] [4,5,5,25,6] => 6
Program should run and print only Tests pass in the console.
*Coded in Java using Netbeans*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
