原创 String與StringBuilder區別

StringBuilder 類型的字符串是動態可修改的,而String中的字符串是不可修改的。 注意:每次 string 調用replace方法,都是通過返回一個新的字符串,而不是改變原有字符串的,而StringBuilder是可直接修改