Saturday 3 December 2016

Aren't String objects in Java immutable?

String s = ...;

s = s.substring(1);


Is this possible? I thought you can't change a String object in Java.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...