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 is a substitution variable?
What is variable and its types?
Write a java program to print fibonacci series?
What is broken and continue statement?
Is void a data type?
what are the methods in object?
What is data movement?
How will you reverse a singly-link list?
Why is singleton not thread safe?
What is predicate in java?
What is the purpose of static methods and variables?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
How do you check whether the list is empty or not in java?
What is finalize()? Is finalize() similar to a destructor?
How to create packages in java?