Why we able to sort a list of Strings using Collections.sort() method ?

Collections.sort(List) method takes list as an argument and that the  objects in List must implements Comparable interface.due to this reason we able to sort a list of Strings.

0 comments :

Post a Comment