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

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!