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 {
    public static <T> T[] splice(T[] arr, int start, int end) {
        int size = end - start;
        T[] newArr = Arrays.copyOf(arr, size);
        System.arraycopy(arr, start, newArr, 0, size);
        return newArr;
    }
}