| preferred AP College board partner for AP classes
AP Computer Science A/Unit 2: Using Objects
Start Practice TestPractice Test
About Exam
medium Solved by 8 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

1.0

C

25.0

D

7.0

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1kaisuki11 0m 00s 100
#2liuwilliam07241011 0m 43s 57
#3jeonsaw172311 1m 03s 37
#4y.seong202712 1m 35s -5
#5chunxiangxu.cxu22 5m 05s -105
#6richa.tuli12 4m 06s -156
#7lsj0803092211 4m 46s -186
Items per page:
10
1 – 7 of 7
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy