This is a Java basic

Help a cable TV operator to sort the channels according to the viewing time. Though it is the longest and easiest sorting method, help him implement the same as there are only a few channels

1 3 5 4 2

Out Put
1 2 3 4 5

Hi there, what is your question?