| preferred AP College board partner for AP classes
AP Computer Science A/Unit 2: Using Objects
Start Practice TestPractice Test
About Exam
easy Solved by 7 students
Java Floating Point Division
< Prev
Next >

Which of the following is an example of using proper floating‐point division to achieve an accurate result?

public class DivisionExample {
    public static void main(String[] args) {
        double chocAmount = 14.0 / 5.0;
        System.out.println(chocAmount);
    }
}
A

Math.pow(14, 5);

B

int chocAmount = 14 / 5;

C

Math.abs(14 / 5);

D

double chocAmount = 14.0 / 5.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
#2chunxiangxu.cxu11 0m 11s 89
#3lsj0803092211 0m 22s 78
#4bommasam00011 1m 24s 16
#5liuwilliam07241011 2m 03s -23
#6zgj0731041702 0m 41s -61
#7richa.tuli02 1m 08s -88
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: [email protected]|Privacy Policy