Output

5

3

5

6

8

7

Sorted array

3

5

6

7

8

There in fact no analysis that can be done, the logic is written by the developers of the class java.util.Array therefore removing the burden for the app developers to do this. That's why Java developers love to code in Java! Happy java coding :)