首页 > 编程语言 >Java把List转成以逗号分隔的字符串

Java把List转成以逗号分隔的字符串

时间:2022-12-10 13:00:09浏览次数:64  
标签:Java String list List 逗号 location document

private static <T> String parseListToStr(List<T> list){
String result = list.stream().map(o-> (String)"'"+o+"'").collect(Collectors.joining(","));
return result;
}
TRANSLATE with x English
Arabic Hebrew Polish
Bulgarian Hindi Portuguese
Catalan Hmong Daw Romanian
Chinese Simplified Hungarian Russian
Chinese Traditional Indonesian Slovak
Czech Italian Slovenian
Danish Japanese Spanish
Dutch Klingon Swedish
English Korean Thai
Estonian Latvian Turkish
Finnish Lithuanian Ukrainian
French Malay Urdu
German Maltese Vietnamese
Greek Norwegian Welsh
Haitian Creole Persian  
  TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back

标签:Java,String,list,List,逗号,location,document
From: https://www.cnblogs.com/jamstack/p/16971417.html

相关文章