数组转字符串用逗号分割

String[] arr = ["1","2","3","4","5"]

String arrString = arr.join(",");

其中逗号可以改成其他任意符号

 

以逗号分割的字符串转为数组

String arrString = "1,2,3,4,5"

String[] arr = arrString.split(",")

其中逗号可以改成其他任意符号