code: public static void multiply(double[] array1, double[] array2) {
          assert (array1.length == array2.length);
          for (int i=0; i<array1.length; i++) {
              array1[i] *= array2[i];
          }
      }
docs: Each element of the second array is multiplied with each element of the first.