Created
February 15, 2016 02:52
-
-
Save rshepherd/6e5e2575d0331a2d9c0d to your computer and use it in GitHub Desktop.
This file contains 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
public class IdentitySwitch { | |
public static void main(String[] args) { | |
String s = "unchanged"; | |
System.out.println(s); | |
foo(s); | |
System.out.println(s); | |
} | |
public void foo(String s) { | |
s = "changed" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment