Java Reference
In-Depth Information
A. Immediately after line 4
B. Immediately after line 5
C. Immediately after line 10
D. Immediately after line 12
E. Immediately after line 13
F. Immediately after line 14
12. What is the output of the following code?
4. byte a = 40, b = 50;
5. byte sum = (byte) a + b;
6. System.out.println(sum);
A. Line 5 generates a compiler error.
B. 40
C. 50
D. 90
E. An undefined value
13. What is the output of the following code?
5. int x = 5 * 4 % 3;
6. System.out.println(x);
A. Line 5 generates a compiler error.
B. 2
C. 3
D. 5
E. 6
14. What is the output of the following code?
3. byte y = 14 & 9;
4. System.out.println(y);
A. Line 3 generates a compiler error.
B. 15
C. 14
D. 9
E. 8
Search WWH ::




Custom Search