StringBuilder vs. StringBuffer - Core Java

What is the difference between StringBuilder and StringBuffer?

StringBuffer is thread safe, where as StringBuilder is not. In other words, StringBuffer class is synchronized and StringBuilder class is not synchronized.

When an application is to run a single thread using some changes for strings, it is advisable to use StringBuilder. If an application uses multiple threads which are used to perform changes to the strings, it is advisable to use StringBuffer.
How to implement shallow cloning and deep cloning - Core Java
Explain how to implement shallow cloning and deep cloning - Cloning is a process to create copies of objects...
What is an abstract class? Difference between abstract class & interfaces.
bstract class & Interfaces - An abstract class defines an abstract concept which can’t be instantiated...
Java interface - What is an interface?
Java interface - An interface is a set of method definition without implementation. It is a protocol of...
Post your comment