Is there some way of initializing a Java HashMap like this?:
Map test = new HashMap{\"test\":\"test\",\"test\
You can create a method to initialize the map like in this example below:
Map initializeMap() { Map ret = new HashMap<>(); //populate ret ... return ret; } //call Map map = initializeMap();