File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes OCP JSE6 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 "OCP JSE6 question" Watch "OCP JSE6 question" New topic

OCP JSE6 question

henry joe
Ranch Hand

Joined: Jul 24, 2012
Posts: 32
Hello guys,

I have a question that goes like this :

which are true?

A. Compilation fails
B Class BeSafe can create many instances of SafeDeposit
C Class BeSafe CANNOT create any instances of SafeDeposit
D Class BeSafe can create only one instance of SafeDeposit
E Class BeSafe can create instances of SafeDeposit without using the getInstance() method
F Once class BeSafe has created an instance of SafeDeposit, it cannot change the value of the instance's " code" variable.

The answer given were B and F but why?
Montgomery Buslingthorpe

Joined: Jul 24, 2012
Posts: 4
Hi Henry,

the same question has been asked and answered here :
Anayonkar Shivalkar

Joined: Dec 08, 2010
Posts: 1545

@ henry joe,

Welcome to CodeRanch!

As Pi Xel has suggested, please SearchFirst.

@ Pi Xel,

Please go through naming policy here.

Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
I agree. Here's the link:
subject: OCP JSE6 question
It's not a secret anymore!