Java Array Element Get tail(Object[] array)

Here you can find the source of tail(Object[] array)

Description

tail

License

Open Source License

Declaration

public static Object[] tail(Object[] array) 

Method Source Code


//package com.java2s;
/*// w  ww  .j  a  v  a  2s.  c  o m
 * Copyright (c) 2012-2016 Institut National des Sciences Appliqu?es de Lyon (INSA-Lyon)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

import static java.util.Arrays.copyOfRange;

public class Main {
    public static Object[] tail(Object[] array) {
        if (array.length >= 1) {
            return copyOfRange(array, 1, array.length);
        }
        return new Object[0];
    }
}

Related

  1. getFrequentElement(int[] bcp)
  2. getItems(T[] items, int[] indices)
  3. getlast(final T[] array)
  4. getLast(T[] l)
  5. tail(int[] original)