Java implementations of different sorting algorithms