You need to sign in to do that
Don't have an account?
Ajay Edla
how to use containskey method in map in salesforce. and please explain meaning of if(!nummap.containsKey(num)), nummap is Map collection, , num is integer variable ( some integer values like 1,1,2,3,2,3)
please explain the meaning of below condition.
if(!nummap.containsKey(num))
nummap is Map collection,
num is integer variable ( some integer values like 1,1,2,3,2,3)
if(!nummap.containsKey(num))
nummap is Map collection,
num is integer variable ( some integer values like 1,1,2,3,2,3)
As Jeffrey said,
The ! in apex means NOT. So that IF statement is checking that num is NOT in the keyset of nummap.
Refer the below help article related to collections.
https://developer.salesforce.com/docs/atlas.en-us.240.0.apexcode.meta/apexcode/langCon_apex_collections.htm
Thanks!!