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 method type?
What is a void method?
what is singleton class in java?
What does compareto () do in java?
Why is java not 100% pure oops?
Why are parameters used in functions?
What is time complexity algorithm?
Explain the difference between arraylist and linkedlist in java?
What is the purpose of encapsulation?
When do we need to use internal iteration? When do we need to use external iteration?
Is cout buffered?
How to use Media tracker Class.
What is default locale java?
What is instance example?
What is static in java?