An example of bubble sort in Java.