I am currently working with a prefilled Hashmap, but I cannot come up with an efficient way to declare a Hashmap instantly. One way I can do it is:
static final LinkedHashMap<String, Integer> test = new LinkedHashMap<String, Integer>() {{
}}
But I was told that this way is not good because of runtime etc.. I need a way though, to fill the List instantly and not in a method, because the method where I need it is accessed multiple times.