Three Kinds of Sorting Algorithms:


Below are three copies of an applet that animates different sorting algorithms. No, this lesson is not about sorting algorithms. But these applets do provide a visual aid to understanding a powerful capability of the Java language--threads.

                    Bi-Directional
Bubble Sort         Bubble Sort        Quick Sort

          
Now start each of the applets, one by one, by clicking on them with the mouse. Notice anything? Yes! The applets are running side by side at the same time! Notice anything else? Yes! You can also scroll this page or bring up one of your browser's panels at the same time that the three sorting applets sort their data. All of this is due to the power of threads.

 

1