Here you can find the source of shiftLeft(Object[] arr, int startIndex, int endIndex)
Parameter | Description |
---|---|
arr | a parameter |
startIndex | a parameter |
endIndex | a parameter |
public static void shiftLeft(Object[] arr, int startIndex, int endIndex)
//package com.java2s; /*/*from ww w . j ava 2 s .co m*/ * GNU GENERAL PUBLIC LICENSE Version 2, June 1991 */ public class Main { /** * overwrites left cell with right cell. If arr='01234', startIndex=1 and endIndex=3 then arr will be <12>234 * (without <>). * * @param arr * @param startIndex * @param endIndex */ public static void shiftLeft(Object[] arr, int startIndex, int endIndex) { for (int i = startIndex; i < endIndex; i++) { arr[i - 1] = arr[i]; } } }