As my professor explained it, if you do this:
Code:
void foo(){
int a = 4;
addSix(a);
}
void addSix(int input){
input = input + 6;
}
"a" will still be 4 after calling addSix() from foo(). But if you do this:
Code:
void foo(){
Hashtable ht = new Hashtable();
addSomething(ht);
}
void addSomething(Hashtable input){
input.put("foo","bar");
}
"ht" will contain "bar" with a key of "foo" after calling addSomething() from foo().