数组中的元素移位
public class Main { public void m() {//N o w J a v a . c o m int[] array = null; // Shift all elements right by one System.arraycopy(array, 0, array, 1, array.length-1); // Shift all elements left by one System.arraycopy(array, 1, array, 0, array.length-1); } }