3 ms·
Everyone says strings in java are immutable, yet you can still re-assign to string variables. It really is up for debate.
by recursive 7y ago
Everyone says strings in java are immutable, yet you can still re-assign to string variables. It really is up for debate.
- eyelidlessness 7y agoJava strings are immutable. Java variables with a string type are not. It's really not up for debate. You can't mutate a string in Java (you can in Ruby), but you can mutate a string variable by reassigning it.
- recursive 7y agoOh, I see the distinction now.