java - How to rewrite ArrayList in opposite direction -


this question has answer here:

i have arraylist , need rewrite in opposite direction. how it?

list<posts> viewlist = new arraylist<posts>();  viewlist = viewlogic.getpostslist(username); 

you can use:

collections.reverse(viewlist); 

as documented oracle here.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -