We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
主要有三种:String, StringBuffer, StringBuilder String是不可变的对象,每次对String类型的改变都可能会生成一个新的对象 StringBuffer和StringBuilder是可以改变的对象。 对于操作效率:StringBuilder > StringBuffer > String 对于线程安全:StringBuffer是线程安全的,可用于多线程(关键方法基本都使用synchronized关键字修饰);StringBuilder是非线程安全的,用于单线程 不频繁的字符串操作使用String
The text was updated successfully, but these errors were encountered:
No branches or pull requests
主要有三种:String, StringBuffer, StringBuilder
String是不可变的对象,每次对String类型的改变都可能会生成一个新的对象
StringBuffer和StringBuilder是可以改变的对象。
对于操作效率:StringBuilder > StringBuffer > String
对于线程安全:StringBuffer是线程安全的,可用于多线程(关键方法基本都使用synchronized关键字修饰);StringBuilder是非线程安全的,用于单线程
不频繁的字符串操作使用String
The text was updated successfully, but these errors were encountered: