字符串拼接和字符串数组拼装成字符串
来源:互联网 发布:tcpudp端口号 编辑:程序博客网 时间:2024/05/16 02:34
使用前提是使用jdk1.8
package com.neutron.string;import java.util.ArrayList;import java.util.List;public class String2List {public static void main(String[] args) {// 字符串List转化为StringList<String> strs = new ArrayList<String>();strs.add("first");strs.add("second");strs.add("third");strs.add("forth");String result = String.join(",", strs);System.out.println("first,second,third,forth".equals(result));// 字符串使用特定字符进行拼接String result2 = String.join("-", "01", "02", "03", "04");System.out.println("01-02-03-04".equals(result2));}}
0 0
- 字符串拼接和字符串数组拼装成字符串
- ios 字符串拼接 字符串拼装 NSString连接
- 数组拼接成字符串
- 字符串数组拼接xml
- 字符串与数组拼接,
- 拼装json字符串
- 变量和字符串拼接
- js中数组拼接成字符串
- 把数组拼接成一个字符串 */
- OC 数组,字符串的拼接
- php 排序数组,拼接字符串
- 二维数组拼接字符串递归
- js把数组拼接字符串
- lua 把table拼装成字符串
- 拼接字符串:
- 字符串拼接
- 字符串拼接
- 字符串拼接
- SrpingMVC启动监听与普通类取Application
- CocoaLumberjack 踩坑
- react native mac 下真机调试 Could not connect to development server.
- 解决编辑页眉页脚时,页码连续问题
- JS如何导出Div的内容为图片
- 字符串拼接和字符串数组拼装成字符串
- MySQL函数大全 及用法示例
- 如何定义一个只有上边圆角的UIButton
- ElasticSearch笔记-基础知识
- 关于PE可执行文件的修改
- 大数据-知乎
- crosswalk 快速入门使用
- SVN 提交代码缩写
- Apache HttpComponents学习笔记(一):请求对象和响应对象