UnsupportedOperationException is an exception whch is thrown on methods that are not supported by actual collection type.
For example, Developer is making a read-only list using “Collections.unmodifiableList(list)
” and calling call()
, add()
or remove()
method. It should clearly throw UnsupportedOperationException.