Example & Tutorial understanding programming in easy ways.

How to make a collection read only?

Use following methods:
1 Collections.unmodifiableList(list);
2 Collections.unmodifiableSet(set);
3 Collections.unmodifiableMap(map);
These methods takes collection parameter and return a new read-only collection with same elements as in original collection.


Read More →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!