Here you can find the source of shift(String[] src, String word)
public static void shift(String[] src, String word)
//package com.java2s; //License from project: Open Source License public class Main { public static void shift(String[] src, String word) { for (int i = 0; i < src.length - 1; i++) { src[i] = src[i + 1];// www . ja v a 2 s .c o m } src[src.length - 1] = word; } }