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 does java not support pointers?
What is assembly language?
Why we use methods in java?
Explain the difference between the public, private, final, protected, and default modifiers?
What are anonymous inner classes?
What are the types of casting?
What is the difference between error and an exception?
What is difference between stringbuffer and string?
How do you use equal in java?
What is tcp ip in java?
How do you change an int to a string?
Why is multiple inheritance not supported in java?
Will minecraft java be discontinued?
Explain about the interpreter in java?
What are desktop procedures?