When you say String is immutable, what do you mean by that?
Say I have String s = "Ness"
s= s+"Technologies";
What will happen? If the value gets appended, then what is
the meaning of immutable here?
Answer Posted / r.jainrocks@gmail.com
When concatenation operator "+"
used with string
it always creates a new String object,
in String pool area.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What purpose do the keywords final, finally, and finalize fulfill?
What makes a function well defined?
How do you make an arraylist empty in java?
What is a stringbuilder?
What is linked hashset and its features?
What are the advantages of encapsulation in java?
Which class should you use to obtain design information about an object in java programming?
Can we call the constructor of a class more than once for an object?
How is tree Mirroring implemented?
What is ctrl m character?
What are methods and how are they defined?
Can we convert list to set in java?
In a container there are 5 components. I want to display all the component names, how will you do that?
What are the limitations of procedural programming approach?
define the terminology association.