Created
November 5, 2018 08:22
-
-
Save d3ep4k/38c73c4f1e1f7f803f5d962126230930 to your computer and use it in GitHub Desktop.
Java is pass by value. You cannot change the reference
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
map = new HashMap(); | |
map.put("name","intellect"); | |
void modify(map){ | |
map.get("name") | |
map.put("name","trade"); | |
map = new HashMap(); | |
map.put("name","scf"); | |
} | |
modify(map) | |
println map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment