Skip to content

Instantly share code, notes, and snippets.

@dancinllama
Created March 20, 2013 21:11
Show Gist options
  • Save dancinllama/5208472 to your computer and use it in GitHub Desktop.
Save dancinllama/5208472 to your computer and use it in GitHub Desktop.
Map<String,String> strMap = new Map<String,String>();
strMap.put('pig','lowercasepig');
strMap.put('PIG','uppercasepig');
strMap.put('PiG','mixedCasePig');
//spits out 3
System.debug(strMap.size());
//spits out 3
System.debug(strMap.keySet().size());
for(String str : strMap.values()){
//Spits out 3 different values, 1 at a time
System.debug('Strmap value: ' + str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment