What is the difference between String, StringBuffer and StringBuilder?
String: Java String object is an immutable i.e. unmodifiable. It can be created by two ways by literal and new keyword.
StringBuffer:
Java StringBuffer is mutable. It can be created by using the new keyword. It is a synchronized means thread-safe.
StringBuilder:
Java StringBuilder is mutable. It is non-synchronized means not thread-safe.
String: Java String object is an immutable i.e. unmodifiable. It can be created by two ways by literal and new keyword.
StringBuffer:
Java StringBuffer is mutable. It can be created by using the new keyword. It is a synchronized means thread-safe.
StringBuilder:
Java StringBuilder is mutable. It is non-synchronized means not thread-safe.
Thanks for post:
ReplyDeletedo choi mo hinh trung quoc
kính áp tròng trung quốc giá rẻ
mỹ phẩm trung quốc cao cấp giá rẻ
túi xách quảng châu giá rẻ