Question
Need help with java code, this is all in a method 1) 3 different arrays are brought in 2) I create local array called arrayWithLargestValues
Need help with java code, this is all in a method
1) 3 different arrays are brought in
2) I create local array called arrayWithLargestValues which is the size of the largest array from the 3 brought in
3) I need to somehow fill the local 'arrayWithLargestValues' with the all different largest values from the 3 different arrays
hopefully I made sense
sample input/output
int [ ] arrayWithLargestValues = new int [ ] // this has to be set to the size of largest array
int [ ] array1 = { 2, 30, 40, 1}
int [ ] array2 = { 100, 10}
int [ ] array3 {13 , 12 , 10 , 19, 28}
arrayWithLargestValues = createArrayWithLargestValues(array1, array2, array3);
output:
An Array with the largest values taken from the 3 arrays has 5 (array3) elements.
the elements in the array are 100 ,40 ,30 , 28, 19
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