I have a string arraylist with some null values ββand some strings. I don't want to sort the arraylist, but I have to sort the arraylist so that the null values ββare the last. Suppose that arraylist {1,2,null,6,5,null, 3} , I should get the values ββnull {1,2,6,5,3,null,null} .
I currently have a solution: Right now, I am building a new arraylist, and if the value is null , I will not drag it to the new list, otherwise I will add it to the new arraylist.
Any other better solution?
Thanks for the help.
source share