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
How we can declare a static variable?
Is double bigger than float?
Can we increase size of array?
How will you compute size of a structure?
List some important characteristics on jre
Difference between arraylist and hashset in java?
Differentiate between == and equals().
Which method must be implemented by all threads?
does java support pointers?
Explain how can you debug the Java code?
What is a file pointer?
Can classes declared using the abstract keyword cab be instantiated?
Explain about anonymous inner classes ?
What is callablestatement? How you can call stored procedure to pass in parameter?
How do you insert a line break?