Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b66uwsWr9B1ouyrzUh
15 lines
423 B
Plaintext
15 lines
423 B
Plaintext
before: get = 100, contains = true
|
|
|
|
after acc.owner = "ankur":
|
|
map.get(acc) = null
|
|
set.contains(acc) = false
|
|
map.containsKey(acc) = false
|
|
map.size() = 1
|
|
iteration still sees it = [Account(ankur)]
|
|
map.remove(acc) = null
|
|
map.size() after remove = 1
|
|
|
|
set.add(acc) again -> size = 2 [Account(ankur), Account(ankur)] (one object, two entries)
|
|
|
|
immutable key: map.get("asha") = 1
|