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 instance means in java?
How to split arraylist elements in java?
How does predicate work in java?
What is the difference between instanceof and isinstance?
What is difference between stringbuffer and string?
Is main a keyword in java?
What is the difference between a loader and a compiler?
Why java is secure? Explain.
What is parse method?
how many types of Inheritance?
What is the difference between dom and sax parser in java?
What is mnemonic in assembly language?
What is data structure in java?
How does arraylist size increase in java?
What is difference between wait and notify in java?