While studying the Collection API, we find that some methods (add, remove,...) may throw a java.lang.UnsupportedOperationException>
Collection
add
remove
java.lang.UnsupportedOperationException>
The obvious examples are the implementations returned from, say, Collections.unmodifiableCollection() and other similar methods. Methods that would change the Collection throw this exception.
Collections.unmodifiableCollection()