我有一个对象数组。
是否可能创建一个新的数组,该数组是原数组的副本,但按相反的顺序排列? 我正在寻找这样的东西。
// my array
ArrayList<Element> mElements = new ArrayList<Element>();
// new array
ArrayList<Element> tempElements = mElements;
tempElements.reverse(); // something to reverse the order of the array