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 is the static import?
What does the “static” keyword mean? Can you override private or static method in java?
What is static method with example?
What are JVM.JRE, J2EE, JNI?
What is difference between printf and scanf?
What is a key in java?
Is 64bit faster than 32 bit?
Can you explain the private protected field modifier?
What is strings in java?
What are constants and how to create constants in java?
What is the use of runnable interface?
Why we use protected in java?
What is the use of StringTokenizer class?
Is space a character in java?
Is nullpointerexception checked or unchecked?