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.
If you want to solve the questions together with the experts and understand the concepts better, please contact us using the contact form or WhatsApp numbers. Selected people get to do that without any additional charges.