1. No, this will throw an exception as only numerics can be used in a for loop
  2. No, this will not iterate
  3. Yes, this will work
  4. No, this will result in a runtime error with the message “Cannot use Linked List”
7 views

1 Answers

Answer: Option 3

The above code uses a for loop to traverse a linked list data structure and return the last object in the list. This will perfectly work.

7 views

Related Questions