Pregunta de entrevista de HCLTech

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

Respuesta de la entrevista

Anónimo

9 de ene 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