microsoft 98-388 Exam Questions

Questions for the 98-388 were updated on : Jul 20 ,2024

Page 1 out of 3. Viewing questions 1-15 out of 42

Question 1 Topic 1, Topic 1, Understand Java fundamentals

HOTSPOT
You need to evaluate the following code segment. 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:

Answer:


Discussions
0 / 1000

Question 2 Topic 1, Topic 1, Understand Java fundamentals

You have the following code segment. Line numbers are included for reference only.

What is the output of line 07?

  • A. -44
  • B. -40.0
  • C. 40.0
  • D. 44.0
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 3 Topic 1, Topic 1, Understand Java fundamentals

HOTSPOT
You are interviewing for a job as a Java developer.
You are presented with the following code. Line numbers are included for reference only.

You need to evaluate what happens when the code runs.
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:

Answer:


Discussions
0 / 1000

Question 4 Topic 1, Topic 1, Understand Java fundamentals

HOTSPOT
You need to evaluate the following Java program. 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:

Answer:


Explanation:
References: https://docs.oracle.com/javase/tutorial/java/data/numberformat.html

Discussions
0 / 1000

Question 5 Topic 1, Topic 1, Understand Java fundamentals

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

What is the output of line 12 when you run printInt()?

  • A. 0
  • B. 1
  • C. 2
  • D. 3
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 6 Topic 1, Topic 1, Understand Java fundamentals

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:

Answer:


Explanation:
References: https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html

Discussions
0 / 1000

Question 7 Topic 1, Topic 1, Understand Java fundamentals

HOTSPOT
You are creating a Java console application.
You need to read a birthdate entered by the user.
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:

Answer:


Explanation:
References: https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html

Discussions
0 / 1000

Question 8 Topic 1, Topic 1, Understand Java fundamentals

DRAG DROP
You need to evaluate the following Java program. Line numbers are included for reference only.

Which three values will be displayed in sequence? To answer, move the appropriate values from the list of values to the
answer area and arrange them in the correct order.
NOTE: Each correct selection is worth one point.
Select and Place:

Answer:


Discussions
0 / 1000

Question 9 Topic 1, Topic 1, Understand Java fundamentals

DRAG DROP
You are interviewing for a job at Adventure Works, Inc. The hiring manager asks you to create a single console program.
The program takes multiple arguments from the command line and writes them to the screen in the same order as they were
typed on the command line.
Which three code segments should you use to develop the solution? To answer, move the appropriate code segments from
the list of code segments to the answer area and arrange them in the correct order.
Select and Place:

Answer:


Explanation:
References: https://docs.oracle.com/javase/tutorial/getStarted/cupojava/netbeans.html
Topic 2, Topic 2, Work with data types, variables, and expressions

Discussions
0 / 1000

Question 10 Topic 2, Topic 2, Work with data types, variables, and expressions

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:

Answer:


Discussions
0 / 1000

Question 11 Topic 2, Topic 2, Work with data types, variables, and expressions

DRAG DROP
You have the following code:

You need to create an int array named numbers initialized with num1, num2, and num3.
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:

Answer:


Explanation:
Example:
int[] numbers = new int[] {num1, num2, num3}
References: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
https://alvinalexander.com/blog/post/java/java-faq-create-array-int-example-syntax

Discussions
0 / 1000

Question 12 Topic 2, Topic 2, Work with data types, variables, and expressions

HOTSPOT
You are creating a method that processes invoices. The invoices are contained in an ArrayList 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.
Hot Area:

Answer:


Explanation:
References: https://beginnersbook.com/2013/12/java-arraylist/

Discussions
0 / 1000

Question 13 Topic 2, Topic 2, Work with data types, variables, and expressions

HOTSPOT
You are writing a Java method.
The method accepts a two-dimensional String array and prints the content of each array element.
The size of each dimension of the array might be different.
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:

Answer:


Explanation:
References: https://www.tutorialgateway.org/two-dimensional-array-in-java/

Discussions
0 / 1000

Question 14 Topic 2, Topic 2, Work with data types, variables, and expressions

HOTSPOT
You are developing a Java program to play Tic-Tac-Toe. You define the following array to store the state of the board:

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:

Answer:


Discussions
0 / 1000

Question 15 Topic 2, Topic 2, Work with data types, variables, and expressions

HOTSPOT
You are writing a Java program.
The program must meet the following requirements:
Truncate firstName to its first five characters

Set output to a string that contains the firstName and the number of characters in firstName

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:

Answer:


Explanation:
References: https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html
https://www.tutorialspoint.com/java/lang/stringbuilder_substring_end.htm

Discussions
0 / 1000
To page 2