posted 21 years ago
The following is the full text of the question.
Which of the following statements are true?
a. class A extends Object.
b. Field i1 is implicitly public because class A is public.
c. Method m1 is implicitly public because class A is public.
d. The compiler will insert a default constructor implicitly.
e. The implicit constructor declaration has no throws clause.
f. The implicitly declared constructor has package access.
g. The implicitly declared constructor accepts one parameter for each field in class A.
h. The implicitly declared constructor invokes the no-parameter constructor of the superclass.
i. None of the Above
As Leandro has stated, the implicitly declared constructor has the same access level as the class. In this case, the access level of the class is public so the access level of the implicitly declared constructor is also public. Therefore, answer option f is false.
The above is a demonstration of why an answer option quoted out of context can be misleading. When asking for an explanation of an answer it is always a good idea to also quote the question.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>