what is the difference between String and StringBuffer classes?

Answer Posted / tarun choudhary

The String class is used for strings that are not allowed to change. The StringBuffer class is used for strings that may be modified by the program.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of default method in interface in java? Explain

626


What are data types in programming?

639


What is merge sort in java?

670


Can a class have more than one object?

635


What is a website container?

590






Describe 2 different ways to concatenate two strings.

766


What is meant by main method?

676


What is classes in java?

596


From the two, which would be easier to write: synchronization code for ten threads or two threads?

708


Explain the difference between comparator and comparable in java?

575


When should you make a function static?

626


What is an immutable class? How to create an immutable class?

630


What are inner classes or non static nested classes in java?

806


What do you mean by composition in java?

665


What does system out println () do?

656