Created
April 26, 2015 15:32
-
-
Save suddeb/1b8040ff88361db43ca0 to your computer and use it in GitHub Desktop.
EmployeeMap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmployeeMap { | |
public void createEmployeeMapAndDisplay(){ | |
Map<Integer, String> employeeMap = new Map<Integer, String>(); | |
employeeMap.put(1, 'James'); | |
employeeMap.put(2, 'Sudipta'); | |
employeeMap.put(3, 'Christiaan'); | |
employeeMap.put(4, 'Victor'); | |
for(Integer index : employeeMap.keySet()){ | |
System.Debug('Index: ' + index + ' Employee: ' + employeeMap.get(index)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment