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 are the advantages of compiled language?
What is replacefirst in java?
What is generic type?
what do you mean by marker interface in java?
How list contains works in java?
What is the use of set in java?
Is arraylist ordered?
How does hashmap work in java ?
What is meant by attribute?
What is use of arraylist in java?
Differentiate between class and structure.
Define locale.
What access modifiers can be used for methods?
What is another word for methodology?
What is stack class in java?