my task is to write a method that takes 2 arrays containing doubles and takes the larger of the two numbers at each index and returns them : <p>Write   a   method  that    takes   two arrays  containing  doubles and returns a   new array<br>
that    contains    the larger of   the two values  at  each    index.  The method  should  handle<br>
cases   in  which   one array   is  longer  than    the other. I'm not really sure how to go about this, So far I have this in the main:</p>

<pre><code> public static void main(String[] args){

 double[] test1 = {3.3, 8.2, 19.0, 38.1, 2.1, 3.7};
 double[] test2 = {4.8, 2.1, 27.3, 6.0};
 double[] maxResult = maximize(test1, test2);
 System.out.println(Arrays.toString(test1));
 System.out.println(Arrays.toString(test2));
 System.out.println(Arrays.toString(maxResult));
  }
</code></pre>

<p>the output I'm trying to get is:</p>

<pre><code>  [3.3, 8.2, 19.0, 38.1, 2.1, 3.7]
  [4.8, 2.1, 27.3, 6.0]
  [4.8, 8.2, 27.3, 38.1, 2.1, 3.7]
</code></pre>

<p>I don't know what to put inside the method to have it take the larger of the two arrays. </p>
