Answer Posted / aashish r. wadhokar
string is immutable,that we can not be modify its value.
when we assign any new value to String variable.a new object
is created on heap memory and that string variable refers to
that object.
whereas
StringBuffer is mutable so we can be modify its value.
as it refers to the same object and changes the state of
that object
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What are the types of java collections? : java collections
Which java collection class can be used to maintain the entries in the order in which they were last accessed?
What is the Spring2.5 MVC Navigation flow?
Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.
How is hashset maintained in memory by java ?
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
What are the types of the main implementing classes in the map interfaces? : java collections
What is an algorithm in java collection framework? : java collections
How do I find jre path in windows?
What do you understand by synchronization? Why is it important?
What is java collection? : java collections
What is the use of hashcode in java ?
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
my interviewer asked me what technical specification you used how to answer that question
What are the different types of features of the java collections framework? : java collections