Java homework Please explain why Thank you Q3 Assume that we
Java homework. Please explain why. Thank you
Q3 Assume that we have a single linked list with head pointer only. The list contains listNodes. Class listNode Int data listNode next Void mystry2 listNode t If (t null. Return Mystry2 t next System.out. println (data) What does the Mystry20 do if we call the following function with the head pointer as a parameter: mystry2( head);Solution
as the function mystry2 is called with the head value . it will iterate till the last until the null if found and then the values of the data is printed because the t.next = null . so it will traverse backward and print the linked list .
