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, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
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
Mathematics, 16.05.2020 19:57
question
Mathematics, 16.05.2020 19:57
question
Biology, 16.05.2020 19:57
question
History, 16.05.2020 20:57
Questions on the website: 13722367