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 / harmetkrishanan
every time a new String object gets created in this case.
| Is This Answer Correct ? | 24 Yes | 5 No |
Post New Answer View All Answers
Is string a wrapper class?
What is the string function?
What is the difference between error and an exception?
What does n mean in java?
What modifiers are allowed for methods in an interface?
Can memory leak happen java?
Tell me the Importent classes in net package?
What if static is removed from main method?
What are the parts of a method?
What is garbage collection? Can it be forced to run?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What is the generic function?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
Why do we need singleton?
What is the purpose of the finalize() method?