String和Char的相互转化//JAVA
2021-04-07 22:28
标签:das color span 直接 返回 str style rar 转化 Char——>String String——>Char 转 : https://www.cnblogs.com/OKDA/p/12477644.html String和Char的相互转化//JAVA 标签:das color span 直接 返回 str style rar 转化 原文地址:https://www.cnblogs.com/fps2tao/p/13381170.htmlString s = String.valueOf(‘c‘); //单个字符
String s = String.valueOf(new char[]{‘c‘}); //转换数组
String s = Character.toString(‘c‘);//实际上直接返回String.valueOf(char)
String s = new Character(‘c‘).toString();
String s = new String(new char[]{‘c‘});
String s = "" + ‘c‘;
String.charAt(index)//return char
String.toCharArray()//return char[]
文章标题:String和Char的相互转化//JAVA
文章链接:http://soscw.com/index.php/essay/72593.html