博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
List与String相互转换
阅读量:3944 次
发布时间:2019-05-24

本文共 379 字,大约阅读时间需要 1 分钟。

文章目录

在这里插入图片描述

List
list = new ArrayList<>(); list.add("小米"); list.add("华为"); list.add("三星"); String List2String = StringUtils.join(list.toArray(), ","); System.out.println("这是列表转换为字符串用逗号分隔: " + List2String); List
String2List = Arrays.asList(List2String.split(",")); System.out.println("这是字符串转换为列表,用逗号分隔: " + String2List);

转载地址:http://zuowi.baihongyu.com/

你可能感兴趣的文章
Creating a Custom Account Type 创建自定义帐户类型
查看>>
Sending Content to Other Apps 将内容发送到其他应用程序
查看>>
Receiving Content from Other Apps 接收来自其他应用程序的内容
查看>>
Adding an Easy Share Action 添加一个简单的共享行动
查看>>
Taking Photos Simply 简单地拍摄照片
查看>>
Recording Videos Simply 简单录制视频
查看>>
Controlling the Camera 控制相机
查看>>
Creating Multiple APKs for Different API Levels 创建多个不同的API级别的APK
查看>>
Creating Multiple APKs for Different Screen Sizes 创建多个APKs为不同的屏幕尺寸
查看>>
Creating Multiple APKs for Different GL Textures 创建多个APK给不同的GL结构
查看>>
Android Package and Manifest File
查看>>
Creating Multiple APKs with 2+ Dimensions 创建两种以上屏幕尺寸多apk支持
查看>>
Abstracting the New APIs 抽象出新的API
查看>>
Proxying to the New APIs 代理新的API
查看>>
Creating an Implementation with Older APIs 用较早版本的APIs实现抽象类
查看>>
Using the Version-Aware Component 使用版本识别组件
查看>>
Enhancing Security with Device Management Policies 加强安全与设备管理策略 Developing for Enterprise
查看>>
Advertising without Compromising User Experience 不降低用户体验的广告
查看>>
Planning Screens and Their Relationships 规划屏幕和它们的关系
查看>>
Planning for Multiple Touchscreen Sizes 规划多个触摸屏尺寸
查看>>