4 ms·
Not quite. If the original collection is modified, the "immutable" view will reflect that change. Plus, you can't statically know if the collection you're pas
by saryant 11y ago
Not quite. If the original collection is modified, the "immutable" view will reflect that change.
Plus, you can't statically know if the collection you're passed is immutable or not. Trying to modify it will just blow up at runtime.