Answer:
Arraylist has a Sort() method,when applied,then Arraylist Items will be Sorted in Ascending Order.
For Example:-
arr_list_names.Sort();
Where arr_list_names is our ArrayList.which contains items like Vishal,Neeraj,Pawan
After sorting,Arraylist will show item in ascending order as
Neeraj,Pawan,Vishal
Asked In: Many Interviews |
Alert Moderator