Friday, September 4, 2009

SCJP Questions

1 interface foo {
2 int k = 0;
3 ]
4
5 public class test implements Foo (
6 public static void main(String args[]) (
7 int i;
8 Cert cert = new test ();
9 i= Cert.k;
10.i= Cert.k;
11.i= Foo.k;
12.)
13.)
14.
What is the result?
A. Compilation succeeds.
B. An error at line 2 causes compilation to fail.
C. An error at line 9 causes compilation to fail.
D. An error at line 10 causes compilation to fail.
E. An error at line 11 causes compilation to fail.
Answer: A

0 comments:

Post a Comment

 

About

Site Info

Information Source

Academy of JAVA by Rajesh Rolen Copyright © 2009 Community is Developed by Rajesh Kumar Rolen WebSite

/* tracking code by yahoo login */