Color scheme Leave a Comment / Uncategorized / By S. Nageswara Rao, Corporate Trainer Collections All Methods – At a Glance Reversing elements with reverse() How many times element occurs with frequency() Replacing elements with replaceAll() Finding Min and Max values with min() and max() Sorting ArrayList with Collections sort() Sorting ArrayList with Collections sort() Comparator Searching an element with binarySearch() Copying one list to another with copy() Swapping two elements with swap() Shuffling the elements randomly with shuffle() Rotating the elements with rotate() Filling List elements with fill() Existence of Common Elements with disjoint() Adding Array to Collections classes with addAll() Finding the Sublist Index with indexOfSubList() Immutable Collection with unmodifiableCollection() Thread-safe Collection with synchronizedCollection() Type-safe Collection with checkedCollection() Enumerated Collection with enumeration() Enumeration to ArrayList with list(Enumeration) Immutable List with nCopies() Singleton List with singletonList()