Java Array Sub Array subArray(E[] array, int start)

Here you can find the source of subArray(E[] array, int start)

Description

sub Array

License

Open Source License

Declaration

public static <E> E[] subArray(E[] array, int start) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

public class Main {
    public static <E> E[] subArray(E[] array, int start) {
        return subArray(array, start, array.length);
    }/*from  ww w . java  2  s.co m*/

    public static <E> E[] subArray(E[] array, int start, int end) {
        final E[] subArray = Arrays.copyOf(array, end - start);
        System.arraycopy(array, start, subArray, 0, end - start);
        return subArray;
    }
}

Related

  1. subArray(double[] a, int begin, int end)
  2. subArray(double[] arr, int start, int fim)
  3. subArray(double[] array, int startIndex, int length)
  4. subarray(double[] orig, int off, int len)
  5. subarray(double[] orig, int off, int len)
  6. subArray(final byte[] source, final int start, final int length)
  7. subArray(final byte[] src, final int srcPos, final int length)
  8. subArray(final char[] source, int from, int to)
  9. subArray(final int[] input, final int start, final int end)