Different sorting algorithms implemented in Java.