How do you initialize a map in Java?

We can also initialize the map using the double-brace syntax: Map<String, String> doubleBraceMap = new HashMap<String, String>() {{ put(“key1”, “value1”); put(“key2”, “value2”); }};

Sizin İçin Seçtik  Is EasyMiner only for litecoin?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do you initialize a map in Java?

We can also initialize the map using the double-brace syntax: Map<String, String> doubleBraceMap = new HashMap<String, String>() {{ put(“key1”, “value1”); put(“key2”, “value2”); }};

Sizin İçin Seçtik  How do I find the size of a map?

Leave a Reply

Your email address will not be published. Required fields are marked *