A brief introduction to the eight sorting algorithms and the implementation through java