How many objects are created for a singleton class
Answer Posted / rajani nagandla
The Singleton is a useful Design Pattern for allowing only
one instance of your class.The Singleton's purpose is to
control object creation, limiting the number to one but
allowing the flexibility to create more objects if the
situation changes. Since there is only one Singleton
instance, any instance fields of a Singleton will occur
only once per class, just like static fields.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Can we use return in constructor?
What is unmodifiable collection in java?
Explain the usage of this with constructors?
What is array and arraylist in java?
What does a method signature consist of?
Can we extend singleton class?
How do you download stubs from Remote place?
what is mena by object block any what is the use of that
What are the methods of object class ?
When the constructor of a class is invoked?
Explain about narrowing conversion in java?
What is an empty class? What functionality does it offer in Java?
How can we break singleton in java?
Is singleton thread safe in java?
What are triggers in DB? Explain their types. How do they work?