Homework 4: ListNode Memory Diagram

ListNode

ListNode Start

Choose the memory diagram below to show the result of executing the following lines of Java code.

t = r.getNext().getNext();
r.setNext(t.getNext());
t.setItem(5);
t.getNext().setNext(r);

ListNode Choices

Write a paragraph justifying your choice.