We were in Cape Cod, and one of my boys wanted to go kayaking. There were very few rental places still open, but Cape Cod Waterways was open, and only 10 minutes away from where we were staying, so we ended up kayaking on the Swan Pond River, up to Swan Pond (the Swan Pond in Dennis, by Route 134)....
Arrays.sort( aryNums ); First you type the word Arrays, then a dot. As soon as you type a dot, NetBeans will display a list of things you can do with arrays. Type the word sort. In between a pair of round brackets, you then put the name of the array you want to sort.
By default sorting is in ascending order. Collections.sort(list); method sort the list items in ascending order. Collections.reverse(list); method sort the list items in descending order. Same as you can sort the arrays also, Let refer the below code snippet, which sort the string array contains name of cities.orting using Comparator. Let have look to sort Employee list using implementation of Comparator interface. If you want to sort object other than their natural ordering at that time we use Comparator.