Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
hard Solved by 17 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

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

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