Skip to content

Instantly share code, notes, and snippets.

@rshepherd
Created February 15, 2016 02:52
Show Gist options
  • Save rshepherd/6e5e2575d0331a2d9c0d to your computer and use it in GitHub Desktop.
Save rshepherd/6e5e2575d0331a2d9c0d to your computer and use it in GitHub Desktop.
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