It's perhaps a nitpick, but it would be more accurate to say that invoking methods on a variable affects the state of the object referenced by that variable's value. Invoking methods never changes...
Type: Posts; User: pbrockway2
It's perhaps a nitpick, but it would be more accurate to say that invoking methods on a variable affects the state of the object referenced by that variable's value. Invoking methods never changes...
Object[] temp = {"foo", null, "bar"};
for(Object ob :temp){
if(ob == null) {
ob = "???";
} else {
ob = null;
}
The situation here is exactly the same as in (B). ob is a local...