String is a immutable objects . it means that string does
not change...........
But it will be chang.........
{
String s="kapil";
String s1="raj";
String s=s1;
then print(.......)
The String has been changed ..
how it is possible and why its called immutable objects
Answer Posted / gohil
Anil Kumar Khichar is wrong there is no issue in assigning
s1 to s.
In case if you do so. Only a referenced is copied to s.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to make a non daemon thread as daemon?
What is the difference between serializable and externalizable interface?
What type of variable is gender?
Where is const variable stored?
What is the use of bufferedreader?
Explain list interface?
What is ascii format?
What is an interoperable application in java ?
What are multiple inheritances?
Is set ordered in java?
Where is jre installed?
Is a boolean variable?
What is jvm? How its run?
What do negative exponents mean?
Explain polymorphism citing an example.