I need to make an ArrayList of ArrayLists thread safe. I also cannot have the client making changes to the collection. Will the unmodifiable wrapper make it thread safe or d
From looking at the Collections source, it looks like Unmodifiable does not make it synchronized.
static class UnmodifiableSet extends UnmodifiableCollection
implements Set, Serializable;
static class UnmodifiableCollection implements Collection, Serializable;
the synchronized class wrappers have a mutex object in them to do the synchronized parts, so looks like you need to use both to get both. Or roll your own!