Map m =new HashMap();
m.put("name","樟树街");
Map m1 =new HashMap();
m.put("name","樟树街1");
Map m2 =new HashMap();
m.put("name","樟树街1");
这一段内容插入的都在m里面....
修改后
package com.huifer.concurrence.issues;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class C {
public static void main(String[] args) {
List> list = new ArrayList<>();
Map m = new HashMap();
m.put("name", "樟树街");
Map m1 = new HashMap();
m1.put("name", "樟树街1");
Map m2 = new HashMap();
m2.put("name", "樟树街1");
list.add(m);
list.add(m2);
list.add(m1);
String s= list.stream().map(p->p.get("name")).collect(Collectors.joining(","));
System.out.println(s);
}
}