//Map holds key and value pair.
//Syntax: Map mapName = new Map();
/*Map countryISTCodeMap = new Map();
countryISTCodeMap.put('India','91');
countryISTCodeMap.put('USA','001');
countryISTCodeMap.put('India','911');//replaces old value with new value.*/
Map countryISTCodeMap = new Map{'India'=>'91','USA'=>'001', 'India'=>'911'};
system.debug('countryISTCodeMap result: '+countryISTCodeMap+' with size '+countryISTCodeMap.size());
system.debug('countryISTCodeMap keys: '+countryISTCodeMap.keyset());
system.debug('countryISTCodeMap values: '+countryISTCodeMap.values());
system.debug('countryISTCodeMap search: '+countryISTCodeMap.containsKey('India'));
system.debug('countryISTCodeMap fetching value based on key: '+countryISTCodeMap.get('India'));
//map keys are case-sensitive.
keyset(): To fetch only keys from the map.
values(): To fetch only values from the map.
containsKey(value): To search a key from the map.
get(key): By supplying the key we can fetch the value.
put(key,value): To add key and value in a map.