String 小知识点

     public static void main(String[] args) {
        Object str1 = null;
        String str2 = null;
        str2=str1+"";  不报错 

        str2 =str1.toString() 报错 
    }
    

猜你喜欢

转载自my.oschina.net/u/198077/blog/1791721