Collections Class
Collection and Collections are not the same thing
Collection is an interface in the collection hierarchy,
while Collections is a utility class with static methods.
It is not another container: its methods take existing collections and perform ready-made operations on them.
Ready-made algorithms
Collections contains operations that you would otherwise have to write manually:
reversing a list, shuffling, finding the minimum and maximum element, counting the frequency of a value, and other algorithms.
List<Integer> numbers = new ArrayList<>(List.of(3, 1, 2, 1));
Collections.sort(numbers);
Collections.reverse(numbers);
System.out.println(Collections.min(numbers));
System.out.println(Collections.max(numbers));
System.out.println(Collections.frequency(numbers, 1));
A list also has its own sort() method for sorting.
Collections.sort() remains a familiar and valid option,
while the other utilities are useful when the collection itself has no matching method.
An unmodifiable view
The unmodifiable... family of methods creates a wrapper
through which the original collection cannot be modified.
List<String> source = new ArrayList<>();
source.add("Java");
List<String> view = Collections.unmodifiableList(source);
source.add("SQL");
System.out.println(view); // [Java, SQL]
The important point is that this is a view, not an independent copy. If the source list is modified directly,
the change is visible through the wrapper as well. When you need a separate unmodifiable snapshot of the data,
it is usually clearer to create one with List.copyOf(source).
When to use utility methods
The Collections class is useful when an operation belongs not to one specific object,
but to a general algorithm over a collection. Once you understand collection interfaces and comparison rules,
you can read these calls as ready-made building blocks rather than as “magic” standard-library methods.
Collections.unmodifiableList() prevents modification through the returned reference,
but it does not block changes to the original list through other references.