Shifting in arrayList
问题 The method public static <T> ArrayList<T> rotate(ArrayList<T> aL, int shift) accepts an Arraylist of String (at least in this example) and a shift which indicated how much the arraylist should shift. If I have, let's say an arayList of [ A, B, C, D, E, F, G] and the shift is 2 , so the method returns [ F, G, A, B, C, D, E] or another example, [ A, B, C, D, E, F, G] and shift is 4 , then the method returns [ D, E, F, G, A, B, C] I did the method completely wrong and have no clue how to