Difference between the String and StringBuffer classes?

Answers were Sorted based on User's Feedback



Difference between the String and StringBuffer classes?..

Answer / anitha

yes, String is a immutable that means once the string
object is created it cannot be changed.

String Buffer: it is a mutable,this object is changed if we
make any modifications.

Is This Answer Correct ?    8 Yes 0 No

Difference between the String and StringBuffer classes?..

Answer / sathya

String class is immutable i.e oncle created the value
cannot chage.

Stringbuffer class is mutable.The value can change.

Is This Answer Correct ?    5 Yes 0 No

Difference between the String and StringBuffer classes?..

Answer / latha

String is immutable and StringBuffer is mutable as most of
we know. In performance, StringBuffer is faster than the
String while performing simple concatenations.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why is a string immutable?

0 Answers  


How many bytes is a char in java?

0 Answers  


Write a function for palindrome and factorial and explain?

0 Answers   Honeywell, Huawei, Zomato,


How to excute - Interface - Inner class- method can any one tell how to execute/ call this main method public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("inside"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }

1 Answers  


What is OOP Language?

0 Answers   Atos Origin,


How hashmap increases its size in java?

0 Answers  


Difference between Superclass and Subclass?

7 Answers  


How do you input a string in java?

0 Answers  


What is the difference between equals() and?

0 Answers  


What methods are called, When we navigate from one applet to another applet?

1 Answers  


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

0 Answers   Genpact,


What is the use of bufferedreader?

0 Answers  


Categories