Java
<pre><code ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
int i = Integer.MAX_VALUE + 10;
What is the result of the given line execution?
ArithmeticException will be thrown
Result is undefined
Negative number will become a value of the i variable
OperationNotSupportedException will be thrown
NaN constant will become a value of the i variable
Explanation
Java doesn't do anything with integer overflow for either int or long primitive types and ignores overflow with positive and negative integers
primitive types
arithmetic operations
1
(1)
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Mark the answer choices in which the pairs are equal to each other (2 correct an...
Which of the following lines will compile without errors and warnings?...
int[] x = new int[25] Which of statements...
What will be printed as a result of the following code execution? ...
Which lines will not cause compilation errors?...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What happens after the following code is compiled and run: ...
What will be the result of the following program execution? ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment