Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java dictionary initialization

        Map<String, List<String>> adjList = Stream.of(
            new SimpleEntry<>("Edmonton", Arrays.asList("E N1", "E N2", "E N3")), 
            new SimpleEntry<>("Vancouver", Arrays.asList("V N1", "V N2", "V N3")))
            .collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #dictionary #initialization
ADD COMMENT
Topic
Name
6+2 =