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.
up vote 8 down vote accepted. Use the Collections.sort(List, Comparator) method: Also in your code it would be good to use the List interface when declaring the List : You could also tighten up the code by using a Student[] and passing it to the ArrayList constructor: Here is a Gist of the full source.se Collections.sort() : Note: might be useful to make your comparator a private static final variable. Note 2: modifies the list in place; does not create a new list.