2020
10-10
10-10
java 各种数据类型的互相转换实例代码
StringBuilder转化为StringStringstr="abcdefghijklmnopqrs";StringBuilderstb=newStringBuilder(str);整型数组转化为字符串StringBuilders=newStringBuilder();for(i=1;i<=n;i++){s.append(String.valueOf(a[i]));}Stringstr=""+s;字符串转化为整形数组Stringstr="123456";int[]a=newint[str.length()];for(inti=0;i<str.length();i++){a[i]=str.charAt(i)-'0';}字符串转化为字符数组Stringstr="...
继续阅读 >