Microsoft Introduction to Programming Using Java - 98-388 Exam Practice Test

You are creating a method that processes invoices. The invoices are contained in an AmayList instance. After each invoice is processed, the method must remove the invoice from the ArrayList instance.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:

You work on a team that develops e-commerce applications. A member of the team creates a class named db that connects to a database. The class contains a method named query.
You need to instantiate the db class and invoke the query method.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
Correct Answer:

You are writing a Java method named safeRoot. The method must meet the following requirements:

How should you complete the code? To answer, select the appropriate code segments in the answer are a. NOTE: Each correct selection is worth one point.

Correct Answer:
You need to evaluate the output of the following code segment. Line numbers are included for reference only.

For each of the following outputs, select Yes if the output is displayed. Otherwise, select No. NOTE: Each correct selection is worth one point.
Correct Answer:

You are writing a Java method named countdown. The method must meet the following requirements:

How should you complete the code? To answer, select the appropriate code segments in the answer area.
Correct Answer: