Which code from the given options if put in Main class will not print “Done”?

  1. Function call:- changeName(im); Function implementation :- { im.name = "Done"; return null; }

  2. Function call:- changeName(im); Function implementation :- { im = new Item("Done"); return null; }

  3. Function call :- im = changeName(im); function implementation :- { Item otherObject = new Item("Done"); return otherObject; }

  4. All of the above


Correct Option: B

Find more quizzes: