Java Array Shift shiftLeftByOne(int[] table)

Here you can find the source of shiftLeftByOne(int[] table)

Description

shift Left By One

License

Open Source License

Declaration

private static void shiftLeftByOne(int[] table) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static void shiftLeftByOne(int[] table) {
        int firstElement = table[0];

        for (int index = 0; index < table.length - 1; index++) {
            table[index] = table[index + 1];
        }//from w  w w . j  av a2  s . c  o m

        table[table.length - 1] = firstElement;
    }
}

Related

  1. shiftLeft(Object[] array, int amount)
  2. shiftLeft(Object[] object)
  3. shiftLeft1(T[] array)
  4. shiftLeftAndFill(byte[] array, int positions)
  5. shiftLeftByCopying(int[] table, int shift)
  6. shiftLeftI(long[] v, int off)
  7. ShiftLeftOne(int[] arr)
  8. shiftNibbles(byte[] bytes)
  9. shiftOff(T[] a)