My Java implementation of binarySort