내 콘텐츠 목록을 뒤집어야합니다. Collections.reverse(temp);
을 찾았지만 올바르게 구현하는 방법을 모릅니다. '당신이 기준과 일치하는 요소를 추가하려면ArrayList를 뒤집는 방법
// Create the list
ArrayList<String> myList = new ArrayList<String>();
// Add some items to it
myList.add("one");
myList.add("two");
myList.add("three");
// Reverse it by using Collections utilities.
Collections.reverse(myList);
Log.i("DEBUG", myList.get(0)); // Should print 'three'
어떤 종류의 컬렉션을 사용하고 있습니까? –
컬렉션이 있습니까 (예 : Array list). 'Collections.reverse (list);'를 사용하려고 했습니까? – Alexmelyon
최소한 귀하의 목록 코드를 게시하십시오. –