Pergunta de entrevista da empresa HCLTech

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

Resposta da entrevista

Sigiloso

9 de jan. de 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