How to create a static Map of String -> Array

后端 未结 6 763
我寻月下人不归
我寻月下人不归 2021-01-11 10:51

I need to create a static Map which maps a given String to an array of int\'s.

In other words, I\'d like to define something l

6条回答
  •  旧巷少年郎
    2021-01-11 11:24

    You can also use: ImmutableMap.of(key, val)

    https://guava.dev/releases/23.0/api/docs/com/google/common/collect/ImmutableMap.html#of--

提交回复
热议问题