Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started