String is immutable.it is true
String can be change to mutable How?
Answer Posted / prathap
Because of String pooling String is immutable. Using StringBuffer we can change it as mutable. i.e.,This string literal reference is assaigened to StringBuffer object
Eg : String s="java";
StringBuffer sb= new StringBuffer(s);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I avoid validating a form before data is entered?
To what value is a variable of the string type automatically initialized?
What class is the top of the awt event hierarchy?
What if the static modifier is removed from the signature of the main method?
What is in-memory replication?
What is a clone?
Why use POJO when I can use hashmap
which type of objects reference will be given to client?
What happens when a thread cannot acquire a lock on an object?
What is Stream Tokenizer?
How a component can be placed on Windows?
Can I have an action without a form?
Explain the steps in details to load the server object dynamically?
Whats new with the stop(), suspend() and resume() methods in jdk 1.2?
How messaging services are done, before release of JMS?