Java tutorial
//package com.java2s; import java.util.Arrays; public class Main { @SuppressWarnings("unchecked") public static <T> T[][] dividirEn(T[] array, int pos, T[][] type) { Object[][] ret = { Arrays.copyOfRange(array, 0, pos), Arrays.copyOfRange(array, pos, array.length) }; return Arrays.asList(ret).toArray(type); } }