I have an ArrayList
in Java
:
{"deleteItem", "createitem", "exportitem", "deleteItems", "createItems"}
I want to move all string which contains delete
to the end of the list, so I would get the next:
{"createitem", "exportitem", "createItems", "deleteItem", "deleteItems"}`
I can create two sublists - one for the words which contain the 'delete' word, and one for the others, and then merge them, but I search for a more efficient way.