Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@loongest
Created October 1, 2019 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loongest/685f5660f2c169e0244fd364bfe54d11 to your computer and use it in GitHub Desktop.
Save loongest/685f5660f2c169e0244fd364bfe54d11 to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
int origin = 333;
System.out.println("[Initially]");
System.out.println("origin = " + origin + " , hashcode= " + System.identityHashCode(origin) + "\n");
change999(origin);
System.out.println("origin = " + origin + " , hashcode= " + System.identityHashCode(origin) + "\n");
}
public static void change999(int args) {
System.out.println("[change999] arg = " + args + " , hashcode = " + System.identityHashCode(args)) ;
int b = args;
System.out.println("[change999] b = " + b + " , hashcode = " + System.identityHashCode(b) + "\n") ;
b = 10000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment