Few different sort methods written in java