I do understand that double brace initialization has its own hidden cost, still is there a possible way to initialize Map<String,Map<String,String>>()
.
What i tried:
Map<String, Map<String, String>> defaultSourceCode = new HashMap<String, Map<String, String>>(){
{"a",new HashMap<String, String>(){{"c","d"}}}
};
I know it is a bad practice but as for experiment i am trying it.
Reference and Motivation: Arrays.asList also for maps?