public MainFram() {
Map<String, Object> aMap = new HashMap<>();{
aMap.put("bj0", new int[]{0, 0});
aMap.put("bm0", new int[]{0, 1});
aMap.put("bx0", new int[]{0, 2});}
for (Map.Entry<String, Object> entry:aMap.entrySet()) {
System.out.println(entry.getValue());
}
}
你这Map集合的Value 是 一维数组,你要取这个第二列数值,参考如下:
int[] arr = (int[])entry.getValue();
System.out.println(arr[1]);
不知道你这个问题是否已经解决, 如果还没有解决的话: