Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 11 initialize map

Map<String, String> emptyMap = Map.of();
Map<String, String> singletonMap = Map.of("key1", "value");
Map<String, String> map = Map.of("key1","value1", "key2", "value2");
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #java #initialize #map
ADD COMMENT
Topic
Name
6+2 =