Is there a way to initialize a Map<String, Integer>
without using put
method ?
I saw that for initalize a Map<String, String>
:
private Map<String, String> myMap = new Map<String, String>('a' => 'John', 'b' => 'Mike', 'c' => 'Eddy');
But this doesn't work with my map.