Hi so im a new memeber and i really need help with this problem. i have no experience on arrays and i have a test on it very soon =/

one of the problems on the test is similar to this one please help me solve it

given the following three int arrays write the appropriate java code that will copy the largest of the valeues at the same relative index position of list1 and list2 into the array largestValues. The print all three arrays, the elements of the same index position for all three arrays on the same line.

int[] list1 = {24, 33, 45, 21, 16, 90, 6, 12, 19, 72, 38, 14}
int[] list2 = {12, 36, 54, 21, 19, 81, 19, 8, 41, 54, 35, 14}
int[] largestValues = new int [list.length];

10 Years
Discussion Span
Last Post by Ezzaral
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.