How many objects are created for a singleton class
Answer Posted / sivadasan
Singleton class allows to create only one instance of the
class. But the other objects can inherit from it. Singleton
is a Design Pattern to restrict create more than one
instance of a class.
And
1. It ensures only one object created for a class
2. Provides global point of access.
Mostly it is used to create DB connections.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is basic syntax?
How many types of string data types are there?
What is scope & storage allocation of static, local and register variables? Explain with an example.
Is void a keyword in java?
What is derived datatype?
What do you mean by light weight and heavy weight components?
What is the final field modifier?
What are the important features of Java 11 release?
What does java stand for?
Can a class be private?
What is nested top-level class?
What is the final keyword?
How big is a pointer?
How many boolean functions are there?
What is the right data type to represent a price in java?