Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Collections;
import java.util.List;

public class Main {
    /**
     * Shift object to the bottom of list
     *
     * @param list  list
     * @param index object index
     */
    public static void shiftItemToBack(List<?> list, int index) {
        if (index >= 0) {
            Collections.rotate(list.subList(0, index + 1), 1);
        }
    }
}