aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes help with an example test question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "help with an example test question" Watch "help with an example test question" New topic
Author

help with an example test question

Rachel Glenn
Ranch Hand

Joined: Oct 24, 2012
Posts: 95
What is true? (Choose three)

A) A method with the same signature as a private final method in class Z can be implemented in a subclass of Z.
B) A final method in class Z can be abstract if and only if Z is abstract.
C) A protected method in class Z can be overriden by any subclass of Z.
D) A private static method can be called only within other static methods in class Z.
E) A non-static public final method in class Z can be overriden in any subclass of Z.
F) A public static method in class Z can be called by a subclass of Z without explicitly referencing the class Z.


The given answer is A,C,F

I say the answer is A,C,D,F !!

what do you think?
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3739
    
  16
D is incorrect because static methods (private or otherwise) can also be called from non-static methods.


Joanne
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1535
Rachel Glenn wrote:What is true? (Choose three)
D) A private static method can be called only within other static methods in class Z.

what do you think?


A non-static method may ALSO call a static method.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Rachel Glenn
Ranch Hand

Joined: Oct 24, 2012
Posts: 95
Akhilesh Trivedi wrote:
Rachel Glenn wrote:What is true? (Choose three)
D) A private static method can be called only within other static methods in class Z.

what do you think?


A non-static method may ALSO call a static method.



aaahhh!! thank you! makes sense!!!
 
jQuery in Action, 2nd edition
 
subject: help with an example test question