FAQ Database Discussion Community

Is this compromise to string immutablity in java? [duplicate]

This question already has an answer here: Is a Java string really immutable? 13 answers All of us know that String is immutable in java - content can not be changed once the string is created. String uses character array char[] value to store string content, here is the...

String count in the pool with println

I am preparing for the OCA SE 7 exam, and some of these questions are really (!) tricky. In one of the books Im using I found an error I think, so I would like to confirm the following please... public static void main(String... args) { String autumn = new...