Example & Tutorial understanding programming in easy ways.

How to make a List (ArrayList,Vector,LinkedList) read only?

A List implementation can be made read only using Collections.unmodifiableList(list). This method returns a new list. If a user tries to perform add operation on the new list; UnSupportedOperationException is thrown. 
 
 

Read More →