| preferred AP College board partner for AP classes
AP Computer Science A/Unit 5: Writing Classes
Start Practice TestPractice Test
About Exam
easy Solved by 15 students
Java Integer Division and Concatenation
< Prev
Next >

What is printed to the console when the following code segment is executed?

public class DivisionTest {
    public static void main(String[] args) {
        int a = 9;
        int b = 4;
        System.out.println(a / b + " is the result");
    }
}
A

Compilation Error

B

2 is the result

C

9/4 is the result

D

2.25 is the result

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
#1Ishaan.m.kurup11 0m 00s 100
#2sgarv251311 0m 00s 100
#3songqiuhui201211 0m 09s 91
#4sailajavadlamani3312 0m 00s 90
#5chunxiangxu.cxu11 0m 12s 88
#6suhanakochhar00611 0m 35s 65
#7cr202210814 1m 13s -3
#8y.seong202712 2m 18s -48
#9bommasam00027 9m 17s -407
Items per page:
10
1 – 9 of 9
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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