shift array element Right - Android java.lang

Android examples for java.lang:array element remove

Description

shift array element Right

Demo Code


//package com.java2s;

public class Main {
    public static <M extends Object> M[] shiftRight(M[] array, int start,
            int end) {
        for (int i = end; i > start; i--)
            array[i] = array[i - 1];//from  ww w  . j  a v  a 2  s.co  m

        return array;
    }
}

Related Tutorials