| 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
< 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

B

3 3.5

C

3.0 3.5

D

3 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
Time
Score
#1zgj0731041722 0m 49s 151
#2sailajavadlamani3311 0m 00s 100
#3kaisuki11 0m 00s 100
#4lsj0803092211 0m 38s 62
#5richa.tuli11 0m 42s 58
#6chunxiangxu.cxu11 0m 46s 54
#7bommasam00012 16m 30s -900
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