【发布时间】:2014-11-24 14:59:39
【问题描述】:
我有一个列表,下面定义了 A。
如何在 Map 中添加 Key 为 Long 值,值为 List 的字符串。
Class A
{
Long in;
List<String> out;
}
Map<Long,List<String>>
【问题讨论】:
-
使用
map.put(key, value)。 -
map.put(a.in, a.out);docs.oracle.com/javase/7/docs/api/java/util/…
标签: java collections