非常奇怪的东西。
这是我的代码:
Map<String, Object[]> data = new HashMap<String, Object[]>();
data.put("1", new Object[] {"VENDOR_NAME", "COUNTRY_CODE", "PREFIX" , "RATE" , "CURRENCY" });
data.put("2", new Object[] {10d, "John", 1500000d});
data.put("3", new Object[] {2d, "Sam", 800000d});
data.put("4", new Object[] {3d, "Dean", 700000d});
Set<String> keyset = data.keySet();
int rownum = 0;
for (String key : keyset) {
System.out.println(key);
}
结果: 3 , 2 ,1 ,4
为什么订单都是混合的:S?