1Z0-811 Object-Oriented Programming Practice Question
A company is developing a configuration manager that must be shared across all components to ensure consistent settings. The manager should prevent direct instantiation and provide a single access point. Which design pattern and implementation should be used?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Singleton pattern with a private constructor and a static getInstance() method
The Singleton pattern ensures a class has only one instance and provides a global point of access. A private constructor prevents direct instantiation, and a static getInstance() method provides controlled access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Prototype pattern with cloning
Why it's wrong here
Prototype pattern creates copies of objects, not for single instance management.
- ✗
Builder pattern with a static inner class
Why it's wrong here
Builder pattern is for constructing complex objects, not for ensuring a single instance.
- ✗
Factory pattern with a public constructor
Why it's wrong here
Factory pattern is for creating families of objects, not for single instance control.
- ✓
Singleton pattern with a private constructor and a static getInstance() method
Why this is correct
Correct. Singleton ensures a single instance and provides global access.
Go deeper
Related to this question
About these practice questions
One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.