String vs. StringBuffer class

What is StringBuffer class?

- StringBuffer class is same as String class except that it is mutable.

- It allows change and does not create a new instance on change of value.

- It consumes less memory when you concat strings.

- It is used for creating mutable string.

String vs. StringBuffer class.

StringStringBuffer
It is immutable.It is mutable.
It is slow.It is fast.
It consumes more memory.It consumes less memory.
It overrides the equals() method of the object class.It does not override the equals() method of the object class.
Significance of StringTokenizer class
Significance of StringTokenizer class - This class is used to break the string into tokens.....
What are the ways to create a thread?
What are the ways to create a thread? - A thread can be created extending from the Thread class......
Preemptive scheduling vs. time slicing
Preemptive scheduling vs. time slicing - Preemptive scheduling ensures the highest priority thread to execute until it enters the waiting or dead states..
Post your comment