What is singleton class?
Answer Posted / akshat maheshwari
A singleton is an class that can be instantiated once, and
only once. This is a fairly unique property, but useful in a
wide range of object designs. Creating an implementation of
the singleton pattern is fairly straightforward - simple
block off access to all constructors, provide a static
method for getting an instance of the singleton, and prevent
cloning.
Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
What is an object in java?
What classes of exceptions may be thrown by a throw statement?
Can java object be locked down for exclusive use by a given thread?
Why static functions are used?
What is an infinite loop?
Which one of the following suits the description of a string better: derived or primitive?
What is navigable map in java?
What are the basics of core java?
Explain the different forms of polymorphism?
What is lambda expression in java?
What is the difference between final, finally and finalize()?
What does this () mean in constructor chaining concept?
what do you mean by classloader?
Can static methods access instance variables in java?
What is the equal sign?