I tried as you said .and i got my Exception Exception in thread "main" java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.add(Unknown Source)
at Tes.main(Tes.java:19)
The return value is specifically designed not to allow additions or removals from the List. So it throws Exceptions if you try to use the unimplemented methods.
If the original List changes, the "unmodifiable" copy changes to match, however.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: UnsuppourtedOperationException when tried to modify the Collections.unmodifiable format .