subject

In the text we developed Java code for traversing a linked list. Here is a, possibly flawed, approach for using a traversal to print the contents of the linked list of strings accessed through letters. Indicate the description that best matches the code. LLNode currNode = letters;

while (currNode != null)

{

System. out. println(currNode. getInfo());

if (currNode. getLink() != null)

currNode = currNode. getLink();

else

currNode = null;

}

a. Very good.
b. Correct but inefficient.
c. Correct but too complex.
d. Will bomb if list is empty.
d. Will bomb if list is not empty.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
You know the right answer?
In the text we developed Java code for traversing a linked list. Here is a, possibly flawed, approac...
Questions
question
Chemistry, 27.04.2020 02:29
question
Mathematics, 27.04.2020 02:29
question
Mathematics, 27.04.2020 02:29
question
Mathematics, 27.04.2020 02:30
question
Mathematics, 27.04.2020 02:30