怎样把一个map中的keys取出来存到一个数组中

2024-12-04 23:22:23
推荐回答(2个)
回答1:

unitMap=new HashMap();
cstmt = conn.prepareCall("{call sp_YG_GetUnitIDsNames()}");
res=cstmt.executeQuery();
while(res.next()){
unitMap.put(res.

回答2:

LinkedHashMap columnMap = new LinkedHashMap();

String[] columns = (String[])columnMap.keySet().toArray();