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
What type of language is java?
Is java a digit method?
Is arraylist dynamic in java?
What is the difference in between cpp and java? Can u explain in detail?
Can we convert list to set in java?
Is treeset sorted in java?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
What checkbox method allows you to tell if a checkbox is checked?
What does flagged out mean?
Can we have a method name same as class name in java?
How do you detect memory leaks?
What is the disadvantage of synchronization?
What does bitwise or mean?
Is null an object java?
Is jdk required on each machine to run a java program?