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
What is the primitive type byte?
What is method in java ?
Which category the java thread do fall in?
How many types of constructors are used in java?
What is the differences between c++ and java? Explain
Does the order of public and static declaration matter in main method?
What are local variables?
What is the difference between processes and threads?
What is the inheritance?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What is the main use of java?
Is empty set an element of empty set?
Explain the importance of finalize() method.
How do you create a bulleted list?
What is Java Package and which package is imported by default?