QuickSort implementation in Java