Monday, October 3, 2011

Quiz of the day | OCPJP (28)

Given:

4. public class Kancil extends Kijang {
5. public static void main(String[] args) {
6. Short sikil = 4;
7. System.out.println(jumlah(sikil, 4));
8. }
9. }
10. class Kijang {http://www.blogger.com/img/blank.gif
11. int jumlah(int x, int y) { return x + y; }
12. }

What is the result?

A. 8
B. Compilation fails due to multiple errors
C. Compilation fails due to an error on line 6
D. Compilation fails due to an error on line 7
E. Compilation fails due to an error on line 11

0 comments: