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
hard Solved by 17 students

Java Integer Overflow

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

2147483648

B

2147483647

C

An ArithmeticException is thrown

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
Total 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
#10Potter1601 0m 05s -15
Items per page:
10
1 – 10 of 17

AI Tutor

How can I help?

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