String is immutable.it is true
String can be change to mutable How?
Answer Posted / sharief
Yes,String is immutable.The simple meaning of immutable is
unmodifiable or unchangeable.once String object has been
created,its value can not be changed.
The Reason is java uses concept of String literal.Suppose
there are 5 reference variables,all referring to an object
called "Ronaldo".If one reference variable changes the value
of the object,it will be affected to all the reference
variables.That is why String objects are immutable in java.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to pass parameters in RMI?
What modifiers may be used with an interface declaration?
Can I import same package/class twice? Will the jvm load the package twice at runtime?
What is the purpose of the notify() method?
Why is actionform a base class rather than an interface?
whats is mean by connectionpooling
Difference between swing and awt?
What is an abstract method?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
Which are the different segments of memory?
What is Remote Server?
What is ioc concept?
Is the session factory thread safe?
What is the relationship between an event-listener interface and an event-adapter class?
What are the benefits of detached objects?