1. What does each of the following print?
a. System. out. Println('b');
b. System. out. Println('b' + 'c');
c. System. out. Println((char) ('a' + 4));
Explain each outcome.
2.Suppose that a variable a is declared as int a = 2147483647 (or equivalently, Integer.MAX_VALUE). What does each of the following print?
a. System. out. Println(a);
b. System. out. Println(a+1);
c. System. out. Println(2-a);
d. System. out. Println(-2-a);
e. System. out. Println(2*a);
f. System. out. Println(4*a);
Explain each outcome
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here