Vcehome > Microsoft > MTA: Introduction to Programming Using Java > 98-388 > 98-388 Online Practice Questions and Answers

98-388 Online Practice Questions and Answers

Questions 4

HOTSPOT

You write the following code:

You need to determine the values of the data1, data2, data3, and data4 variables.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code.

NOTE: Each correct selection is worth one point.

Hot Area:

Browse 42 Q&As
Questions 5

HOTSPOT

You are interviewing for a job as a Java developer. You need to evaluate the following code. Line numbers are included for reference only.

For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.

Hot Area:

Browse 42 Q&As
Questions 6

HOTSPOT

You are writing a Java console program. The program accepts command line arguments.

You need to ensure that the main method parses and handles each command line argument.

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.

Hot Area:

Browse 42 Q&As
Questions 7

HOTSPOT

You work as an intern Java programmer at Adventure Works. Your team lead asks you to create a method. The method must meet the following requirements:

Accept an int array

Check for duplicate values in the array

Stop the outer loop as soon as a duplicate value has been detected and return true

Return false if all values in the array are unique 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.

Hot Area:

Browse 42 Q&As
Questions 8

HOTSPOT

You are writing a Java console program.

The program must meet the following requirements:

Read a line of text entered by the user

Print each word in the text to the console on a separate line

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.

Hot Area:

Browse 42 Q&As
Questions 9

HOTSPOT

You need to evaluate the following code. Line numbers are included for reference only.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code. NOTE: Each correct selection is worth one point.

Hot Area:

Browse 42 Q&As
Questions 10

HOTSPOT

You write the following Java program for Munson's Pickles and Preserves Farm. Line numbers are included for reference only.

You encounter error messages when you attempt to compile the program.

You need to ensure the program compiles successfully.

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.

Hot Area:

Browse 42 Q&As
Questions 11

HOTSPOT

You write the following Java program for Munson's Pickles and Preserves Farm. Line numbers are included for reference only.

You encounter error messages when you attempt to compile the program.

You need to ensure the program compiles successfully.

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.

Hot Area:

Browse 42 Q&As
Questions 12

DRAG DROP

You are writing a Java method that evaluates an arithmetic formula.

The method accepts an int value named number, raises the value to the second power, and returns the negative value of the result.

How should you complete the code? To answer, drag the appropriate code segment to the correct position. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to

view content.

NOTE: Each correct selection is worth one point.

Select and Place:

Browse 42 Q&As
Questions 13

You need to evaluate the following code segment:

What happens when the code segment is run?

A. iNum has a value of 0.

B. An exception is thrown.

C. iNum has a value of 2.

D. iNum has a value of 3.

Browse 42 Q&As
Exam Code: 98-388
Exam Name: Introduction to Programming Using Java
Last Update: May 05, 2024
Questions: 42 Q&As

PDF

$49.99

VCE

$59.99

PDF + VCE

$67.99