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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!