共计 182 个字符,预计需要花费 1 分钟才能阅读完成。
要将字符串转换为字符数组,可以使用 toCharArray() 方法。例如:
toCharArray()
String str = "Hello World"; char[] charArray = str.toCharArray();
这样就将字符串 ”Hello World” 转换为了字符数组['H', 'e', 'l', 'l', 'o', '','W','o','r','l','d']。
['H', 'e', 'l', 'l', 'o', '','W','o','r','l','d']
丸趣 TV 网 – 提供最优质的资源集合!
python遍历列表有哪些用途
python中怎么输入数字列表