Explain Global vs. Local variables.
Answers
Answered by
0
String is immutable means that you cannot change the object itself, but you can change the reference to the object. When you execute a = "ty" , you are actually changing the reference of a to a new object created by the String literal "ty" .
Similar questions
Biology,
5 months ago
Computer Science,
10 months ago
Geography,
11 months ago
Geography,
11 months ago