1.用java,源码龙星征途源码怎么把php数组转换成HashMap或者集合
用java,怎么把php数组转换成HashMap或者集合
public class Test
{
public static void main(String[] args)
{
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("url", "abc");
map.put("alt","");
list.add(map);
HashMap<String, Object> map1 = new HashMap<String, Object>();
map1.put("url", "bcd");
map1.put("alt", "");
list.add(map1);
HashMap<String, Object> map2 = new HashMap<String, Object>();
map2.put("url", "cde");
map2.put("alt", "");
list.add(map2);
for(HashMap<String, Object> lists : list)
{
System.out.println(lists);
}
}
}
结果:
{ alt=, url=abc}
{ alt=, url=bcd}
{ alt=, url=cde}
澤連斯基:特朗普會讓烏克蘭危機提早結束
数易文化算命源码_数易文化准吗
万象充值源码_万象充值源码怎么用
庄家控盘线源码_庄家控盘指标源码
江西鹰潭:优化营商环境 提升服务质量
域名价值评估源码在哪_域名价值评估源码在哪找