InterviewSolution
Saved Bookmarks
| 1. |
How To Sort Arraylist In Java? |
|
Answer» Collections class has a STATIC method sort which can be used for SORTING an arraylist. There are TWO overloaded versions of sort method -
If you have a List called cityList it can be sorted LIKE this - Collections.sort(cityList); Collections class has a static method sort which can be used for sorting an arraylist. There are two overloaded versions of sort method - If you have a List called cityList it can be sorted like this - Collections.sort(cityList); |
|