このコード行を実行すると、どのような動作が期待されますか?:
Foo f = someOtherObject.getFoo(); //We get a reference of a Foo object from another class
f = new Foo();
someOtherObject.getFoo() は新しいオブジェクトを返すでしょうか、それとも古いオブジェクトを返すでしょうか? また、コードの 2 行目を次のように変更するとどうなりますか?
f = null;
someOtherObjct.getFoo() は null を返しますか、それとも古いオブジェクトを返しますか?