Immutable Collection unmodifiableCollection()

The collection classes (data structures), we make, are generally modifiable. That is, elements can be added, deleted or replaced at any time. But sometimes, it may be required to have read-only collection classes where any modification to the collection cannot be done. For this, the Collections class (remember, Collection and Collections, both are different) comes …

Immutable Collection unmodifiableCollection() Read More »