@@ -0,0 +1,872 @@
+%0Apackage net.restlesscoder.sandbox;%0A%0Aimport java.lang.reflect.Array;%0Aimport java.util.Arrays;%0A%0Apublic class ZipArrays %7B%0A%0A%09public static void main(final String... args) throws Exception %7B%0A%09%09final String%5B%5D a = %7B %22hello%22, %22cruel%22, %22world%22 %7D;%0A%09%09final String%5B%5D b = %7B %22how%22, %22are%22, %22you%22 %7D;%0A%09%09final String%5B%5D c = %7B %22until%22, %22next%22, %22time%22 %7D;%0A%09%09System.out.println(Arrays.deepToString(zip(a, b, c)));%0A%09%7D%0A%0A%09@SafeVarargs%0A%09public static %3CT%3E T%5B%5D%5B%5D zip(final T%5B%5D... arrays) %7B%0A%09%09@SuppressWarnings(%22unchecked%22)%0A%09%09final T%5B%5D%5B%5D zipped = (T%5B%5D%5B%5D) //%0A%09%09Array.newInstance(arrays%5B0%5D.getClass().getComponentType(), arrays%5B0%5D.length, arrays.length);%0A%09%09return pivot(arrays, zipped);%0A%09%7D%0A%0A%09private static %3CT%3E T%5B%5D%5B%5D pivot(final T%5B%5D%5B%5D src, final T%5B%5D%5B%5D dest) %7B%0A%09%09for (int a = 0; a %3C src.length; a++) %7B%0A%09%09%09for (int i = 0; i %3C src%5Ba%5D.length; i++) %7B%0A%09%09%09%09dest%5Bi%5D%5Ba%5D = src%5Ba%5D%5Bi%5D;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return dest;%0A%09%7D%0A%7D%0A

Add Java implementation of Python's zip function