hi to all. well can you please tell me that why String class
is immutable?
Thanks in advance.
Answer Posted / hari
Well it is immutable because of the memory concern. For
every new string if there is new object then it will take
lot of memory and if there is such requirement then there
is StringBuffer class provided.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is the constructor and how many types of constructors are used in java?
Why map is used in java?
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
Why do we need autoboxing in java?
Who found java?
What do you understand by soft reference?
Explain about the performance aspects of core java?
Differentiate storage classes on the basis of their scope?
Why is logger singleton?
What is jdbc api?
What are the benefits of operations in java?
How do you do exponents in java?
What is the platform?
What is super keyword explain with example?
How to compare two strings in java program?