98-388 Exam QuestionsBrowse all questions from this exam

98-388 Exam - Question 4


HOTSPOT -

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

Exam 98-388 Question 4

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:

Exam 98-388 Question 4
Show Answer
Correct Answer:
Exam 98-388 Question 4

References:

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

Discussion

3 comments
Sign in to comment
ouzss
Dec 11, 2020

output of line 5 is 03.141593

Rakss
Jan 24, 2021

how? please explain

Abhitera
Feb 12, 2021

All answers are correct

Adrian
Jun 29, 2021

public class MyClass { public static void main(String args[]) { double pi = Math.PI; System.out.format("Pi is %.3f%n", pi); System.out.format("Pi is %.0f%n", pi); System.out.format("Pi is %09f%n", pi); } }