SyntaxFix
Write A Post
Hire A Developer
Questions
You can use:
HashMap<String,Integer> m = Maps.newHashMap( ImmutableMap.of("a",1,"b",2) );
It's not as classy and readable, but does the work.