@@ -0,0 +1,1353 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.EnumMap;%0Aimport java.util.List;%0A%0Apublic class JavaEnumMap01 %7B%0A%0A    enum RACE %7B DWARF, ELF, HOBBIT, HUMAN %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        String%5B%5D myArray01 = new String%5B%5D %7B%0A                %22Gimli%22, %22Fili%22, %22Kili%22, %22Thorin%22%0A        %7D;%0A        String%5B%5D myArray02 = new String%5B%5D %7B%0A                %22Arwen%22, %22Elrond%22, %22Gladriel%22, %22Legolas%22%0A        %7D;%0A        String%5B%5D myArray03 = new String%5B%5D %7B%0A                %22Frodo%22, %22Bilbo%22, %22Samwise%22, %22Pippin%22, %22Merry%22%0A        %7D;%0A        String%5B%5D myArray04 = new String%5B%5D %7B%0A                %22Aragorn%22, %22Boromir%22, %22Saruman%22, %22Gandalf%22, %22Eowyn%22%0A        %7D;%0A%0A        // Create a Map of RACE with variable length ArrayList of Strings in each Entry%0A        EnumMap%3CRACE, List%3CString%3E%3E namesMap = new EnumMap%3C%3E(RACE.class);%0A        namesMap.put(RACE.DWARF, new ArrayList%3C%3E(Arrays.asList(myArray01)));%0A        namesMap.put(RACE.ELF, new ArrayList%3C%3E(Arrays.asList(myArray02)));%0A        namesMap.put(RACE.HOBBIT, new ArrayList%3C%3E(Arrays.asList(myArray03)));%0A        namesMap.put(RACE.HUMAN, new ArrayList%3C%3E(Arrays.asList(myArray04)));%0A%0A        // For each key/value pair in the Map print the RACE (key) and the List of names (value) of that RACE%0A        namesMap.forEach((key, value) -%3E System.out.println(key + %22: %22 + value));%0A    %7D%0A%7D%0A

Add EnumMap example.