Multiple Choice Question

Quiz Guidelines

 

QID: 
98
Question: 

What happens when you try to compile and run the following class...

public class TestClass{
public static void main(String[] args) throws Exception{
int a = Integer.MIN_VALUE;
int b = -a;
System.out.println( a+ " "+b);
}
}

Select 1 option

A. It throws an OverFlowException.
B. It will print two same negative numbers.
C. It will print two different negative numbers.
D. It will print one negative and one positive number of same magnitude.
E. It will print one negative and one positive number of different magnitude.

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!