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
Why do we need data structure in java?
What is string syntax?
What sorting algorithm does javascript use?
How to sort array of 0 and 1 in java?
What is anti pattern in programming?
What is overloading and overriding in java?
What is token in java?
How do you find the independent variable?
How many types of equations are there?
Is there a way to increase the size of an array after its declaration?
What is a platform?
Why is boolean important?
What is used of static keyword in java?
How do you allocate memory to object?
What are the different types of java?