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
Explain all java features with real time examples
How big is a 32 bit integer?
What is generics in java interview questions?
Can a boolean be null java?
Can you give names of Container classes?
Can you explain the cs option of java interpreter?
What is the difference between a method and a function in alice?
Is list ordered in java?
What are the important methods of java exception class?
Differences between external iteration and internal iteration?
What is a local class in java?
What are the new features in java 8?
How do you input a string in java?
What environment variables do I need to set on my machine in order to be able to run java programs?
Can you call a method in a method?