Darren New <dne### [at] san rr com> wrote:
> Yes! Precisely. You're not changing the value of 5. You're changing the
> value of 'a'.
I'm sorry, but I'm having difficult time understanding what you are
talking about. It just seems inconsistent and incoherent.
In a previous post you argued how you are not changing the value of 'a'
and now you are saying that you are.
> Contrast with
> a = " hello "; b = a; a.trim();
> Whether you changed 'b' depends on whether string literals have value or
> reference semantics. *Unless* strings are read-only, in which case a.trim()
> returns a new string which gets discarded.
I don't really understand what's your point.
--
- Warp
Post a reply to this message
|