You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mskuba01, Yeah this makes sense. The first snippet returns a modifiable keySet which breaks the encapsulation. @pierDipi can you please assign this to me?
please replace
with something, like
to avoid breaking encapsulation.
More details can be found here
https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html#keySet--
Returns a Set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa.
The text was updated successfully, but these errors were encountered: