Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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);
    }
}