![]() |
Why string objects are immutable in java?
Because java uses the concept of string literal. Suppose there are 5 reference variables,all referes to one object "sachin".If one reference variable changes the value of the object, it will be affected to all the reference variables. That is why string objects are immutable in java.
|
All times are GMT -7. The time now is 04:58 PM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.