| preferred AP College board partner for AP classes
AP Computer Science A/Unit 2: Using Objects
Start Practice TestPractice Test
About Exam
hard Solved by 19 students
Java Integer Overflow
< Prev
Next >

What is printed when the following code segment is executed?

int max = Integer.MAX_VALUE;
int result = max + 1;
System.out.println(result);
A

An ArithmeticException is thrown

B

2147483648

C

2147483647

D

-2147483648

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
#1jeonsaw172322 0m 35s 165
#2thuyjerry11 0m 00s 100
#329AmeliaC11 0m 30s 70
#4sgarv251314 0m 00s 70
#5sailajavadlamani3314 0m 00s 70
#6kaisuki14 0m 00s 70
#7patrickmeijer00914 0m 50s 20
#8zgj0731041711 1m 47s -7
#9richa.tuli11 1m 50s -10
#10chunxiangxu.cxu12 2m 14s -44
Items per page:
10
1 – 10 of 15
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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