Are you taking CLEP classes? Try clep.ai
| 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 9 students

Integer and Floating Point Division

Mark
< Prev
Next >

What is the output of the following program?

public class DivisionTest {
    public static void main(String[] args) {
        double x = 7/2;
        double y = 7/2.0;
        System.out.println(x + " " + y);
    }
}
A

3.0 3.5

B

3 3.5

C

3 3

D

3.0 3

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1zgj0731041722 0m 49s 151
#2sailajavadlamani3311 0m 00s 100
#3kaisuki11 0m 00s 100
#4Potter1611 0m 10s 90
#5lsj0803092211 0m 38s 62
#6richa.tuli11 0m 42s 58
#7chunxiangxu.cxu11 0m 46s 54
#8bommasam00012 16m 30s -900
Items per page:
10
1 – 8 of 8

AI Tutor

How can I help?

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