Is there any shorter way of doing this?
Map<String, Integer> values = new HashMap<String, Integer>();
values.put("A", 1);
values.put("E", 1);
values.put("D", 2);
values.put("R", 2);
values.put("B", 3);
values.put("M", 3);
values.put("V", 4);
values.put("Y", 4);
values.put("J", 8);
values.put("X", 8);
With arrays in Java you can do this for example
int[] temp = {1,2};
instead of
int[] temp = new int[2]
temp[0] = 1;
temp[1] = 2;
I am looking to something similar with the Map above. Is that possible?
Thanks for the help, as always :)