Which of the given options code is correct and will not waste memory.

  1. Item im = new Item(null); im = (Item ) itemList.get(0);

  2. Item im = new Item(“Done”); im = (Item ) itemList.get(0);

  3. Item im = null; im = (Item ) itemList.get(0);

  4. All of the above.


Correct Option: C

Find more quizzes: