Here you can find the source of shift(String[] tokens)
public static String[] shift(String[] tokens)
//package com.java2s; //License from project: Open Source License public class Main { public static String[] shift(String[] tokens) { return shift(tokens, 1); }// w ww. j a va 2 s.c o m public static String[] shift(String[] tokens, int shift) { if (shift == 0) { return tokens; } int n = tokens.length; if (n < shift) { return null; } return copy(tokens, shift, n - shift); } public static String[] copy(String[] array, int offset, int length) { assert (array.length >= offset + length); String[] aa = new String[length]; System.arraycopy(array, offset, aa, 0, length); return aa; } }