Difference between String & StringBuffer

Answer Posted / tashu

1)String class is of fixed length, but stringbuffer class is
of variable length.

2)String class can't insert character or sub string in the
middle of string, but in Stringbuffer class this is possible.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What Is Query Throttling in java?

565


Can we nested try statements in java?

632


What are predefined functions?

580


How do you define a method?

515


What is the instance of an object?

559






What is classpath?

552


What happens when I use / and % with a negative numerator?

538


Can we sort arraylist in java?

565


Can a boolean be null java?

545


Can an object subclass another object?

558


Define how does a try statement determine which catch clause should be used to handle an exception?

588


What is byte [] in java?

540


What is the size of an array?

553


What is empty string literal in java?

567


What is boolean law?

522