Sorting an ArrayList

Write a program that creates an ArrayList of Integers. Fill the ArrayList with random numbers from 10 to 99. Display the values in the ArrayList on the screen. Then using the sort of your choice, arrange the values from largest to smallest and display them again.

You must put the sorting code in its own function.

ArrayList before: [30, 86, 19, 58, 26, 51, 50, 35, 97, 56, 43, 82, 57, 54, 40, 85, 55, 29, 76, 35]
ArrayList after : [97, 86, 85, 82, 76, 58, 57, 56, 55, 54, 51, 50, 43, 40, 35, 35, 30, 29, 26, 19]



©2013 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License