Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Arrays;

public class Main {

    public static int[] offsetArray(int[] array, int offset) {
        int length = array.length;
        int moveLength = length - offset;
        int[] temp = Arrays.copyOfRange(array, moveLength, length);
        System.arraycopy(array, 0, array, offset, moveLength);
        System.arraycopy(temp, 0, array, 0, offset);
        return array;
    }
}