标签:ash tco hashmap system use text dem bsp new
Java demo:
Map<String, User> map = new HashMap<>(); map.put("id1", new User(1,"name1")); map.put("id2", new User(2,"name2")); String str = map.entrySet().stream().map(entry -> "id[" + entry.getKey() + "], code=" + entry.getValue().getCode() + ", text=" + entry.getValue().getText() ).collect(Collectors.joining("; ")); System.out.println("str==="+str);
end.
标签:ash tco hashmap system use text dem bsp new
原文地址:https://www.cnblogs.com/zhuwenjoyce/p/13212840.html