1.int类型和String类型的相互转换 A.int -- String 推荐用: public static String valueOf(int i) 返回 int 参数的字符串表示形式. B.String -- int 推荐用: public static int parseInt(String s) 将字符串参数作为有符号的十进制整数进行解析 public class IntegerDemo { public static void main(String[] args) { // i…
原创地址: http://www.cnblogs.com/Alandre/ (泥沙砖瓦浆木匠),须要转载的,保留下! Thanks Although the world is full of suffering , it is full also of the overcoming of it. -Hellen Keller 相信自己看得懂就看得懂了,相信自己能写下去,我就開始写了.事实上也简单-泥沙砖瓦浆木匠 Written In The Font Three pieces[52-3]…
1. String类型 String类源码 为了从本质上理解String类型的特性所在,我们从String类型的源码看起,在源码中String类的注释中存在以下: /**Strings are constant; their values cannot be changed after they * are created. String buffers support mutable strings. * Because String objects are immutable they ca…