Hello guys, you can Sort an ArrayList in Java without using the sort() method from the Collections class or the List interfaces' sort() method by implementing your own sorting algorithm. You can use any sorting algorithm like bubble sort, insertion sort, selection sort, quicksort, or merge sort to sort your ArrayList without using sort() method from Collection API. In the past, I have even showed multiple examples of sorting List in Java in both increasing and decreasing order. We have even seen example of sorting List in custom order using Comparator and in this article I will show you multiple way to sort an ArrayList without using Java Collection API.
This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here