Suppose there is an Online shopping cart application having
different objects like Cart, SelectionItem, Billing,
COnfiguration, Authentication, Authorization,
PersonalDetails etc. Out of this which one can be made a
singleton pattern and why?
Answer Posted / siddharth
With singleton design pattern we can ensure the following:
1) Only one instance on the class is created
2) Provide global point of access to the object.
example: printerspoolers
So in the above question configuration can be made a
singleton design pattern as configuration is same for
everyone
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
Explain the difference between the public, private, final, protected, and default modifiers?
What does 3 dots mean in java?
What is the method in java?
Which is the class in java?
What is the java idl system?
How does compareto work in java?
What are the advantages of java?
os is developed in c no java is more secured then c na why dont the os developed is developed using java
What do you mean by byte code?
Explain the pointers in Java?
What is bean? Where it can be used?
What is immutable state?
What is break and continue statement?
What is variable explain with example?
What is lazy initialization in java?