Here you can find the source of max(final double[] a, final double[] b)
public static Callable max(final double[] a, final double[] b) throws Exception
//package com.java2s; import java.util.concurrent.*; public class Main { public static Callable max(final double[] a, final double[] b) throws Exception { if (a.length != b.length) throw new Exception(""); Callable c = new Callable() { public Object call() throws Exception { double[] result = new double[a.length]; for (int i = 0; i < a.length; i++) { result[i] = Math.max(a[i], b[i]); }/*w ww . j a v a 2s .c om*/ return result; } }; return c; } }