HCLTech interview question

1) Difference between Array.sort() and Collection.sort()

Interview Answer

Anonymous

9 Jan 2019

Arrays.sort works for arrays which can be of primitive data type also. Collections.sort() works for objects Collections like ArrayList, LinkedList, etc. We can use Collections.sort() to sort an array after creating a ArrayList of given array items.

1