Created
May 3, 2016 11:07
-
-
Save shau-lok/13905d61f5693b0b80a0de9a501c5c0f to your computer and use it in GitHub Desktop.
ArrayList move specific item in array list to the first item
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Util.getListSize(hotellist) > 0) { | |
int index = hotellist.indexOf(h); | |
hotellist.remove(index); | |
hotellist.add(0, h); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment