Created
November 7, 2016 13:22
-
-
Save chermehdi/6b18b15e69ea2fab3ee13704d069c57c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String a = "MyString"; | |
String b = "MyOtherString"; | |
a = a + b; // a new String has been created here | |
String s = a.substring(1); // the "a" string is not modified a new String Object is created every single time | |
// we do this kind of operations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment