APFIVE APFIVE | preferred AP College board partner for AP classes
AP Classes
AP Computer Science A
AP Human Geography
AP Comparative Government and Politics
AP European History
AP Macroeconomics
AP Microeconomics
AP Psychology
AP United States Government and Politics
AP United States History
AP Calculus AB
AP Calculus BC
AP Computer Science Principles
AP Precalculus
AP Statistics
AP Biology
AP Chemistry
AP Environmental Science
AP Chinese
AP Art History
AP English Literature
AP Research
AP Spanish Literature
AP Art & Design
AP World History: Modern
AP English Language
AP French
AP German
AP Japanese
AP Latin
AP Italian
AP Spanish Language
AP Music Theory
AP Physics 1
AP Physics 2
AP Physics C: Mechanics
AP Physics C: E&M
AP African American Studies
AP Computer Science A/Unit 2: Using Objects
Start Practice Test
Share
medium Solved by 6 students
Java Math Library Expression
< Prev
Next >

Consider the following code segment. What is the value of result after the code segment is executed?

double a = 16.0;
double b = -9.0;
double result = Math.sqrt(Math.abs(b)) + Math.pow(a, 0.5);
A

NaN

B

25.0

C

1.0

D

7.0

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1kaisuki11 0m 00s 100
#2jeonsaw172311 1m 03s 37
#3y.seong202712 1m 35s -5
#4richa.tuli12 4m 06s -156
#5lsj0803092211 4m 46s -186
APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy