One of hundreds of answers available with our premium content service.
A: Small data sets can be sorted using a simple bubble sort algorithm that steps through the sequence, compares adjacent values and swaps them if necessary. The example below uses a recursive sort(int[]) method to re-process the integer array if the sequence changes. In the final pass there is no change and the sorted array is returned.
… full answer hidden
Premium members click below for full answer
How can I sort 3 numbers using Java?
We love social media, but we do not expect you to create yet another public outpost on the Web.