File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "OCP JSE6 question" Watch "OCP JSE6 question" New topic
Author

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
Greenhorn

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

the same question has been asked and answered here : http://www.coderanch.com/t/541410/java-programmer-SCJP/certification/SCJP-creation-singleton
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1505
    
    5

@ henry joe,

Welcome to CodeRanch!

As Pi Xel has suggested, please SearchFirst.

@ Pi Xel,

Please go through naming policy here.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OCP JSE6 question