final Map<String, String> mStates = Collections.unmodifiableMap(new HashMap<String,String>() {{ put("AL", "Alabama"); put("AK", "Alaska"); put("AZ", "Arizona"); }});
Programming Tips - Java: Initialize immutable Map in Java8
Date: 2020aug4
Language: Java
Q. Java: Initialize immutable Map in Java8
A. Use Collections.unmodifiableMap() like this