Recursion Java ArrayList inverse
public ArrayList<Object> reverse(ArrayList<Object> arrayList) {
if(arrayList.size() > 1) {
Object value = arrayList.remove(0);
reverse(arrayList);
arrayList.add(value);
}
return arrayList;
}
Lazy Lyrebird