(String) 和 String.valueOf() 两种字符串转换的区别

使用 String.valueOf() 进行数据转换,如果被转换的数据为 null, 则这种方法将返回一个 "null" 字符串

(String) 方法进行转换时,如果被转换的数据为 null, 则返回 null 对象而不是一个 "null" 字符串。

posted @ 2009-06-01 10:45  匡匡  阅读(442)  评论(0)    收藏  举报