What is singleton class?
Answer Posted / abhijith thette nagarajan
As per the definition,Singleton class in one such class
which will have only one instance of it at any given point
of time...
But,it is allowed to any number of instances,not
necessarily be one..
Generally its contructor will have "protected" key work,no
problem also if we have private also,but if it is
private,we need to have a getter method to create an
instance...
| Is This Answer Correct ? | 34 Yes | 20 No |
Post New Answer View All Answers
Does list maintain insertion order java?
What is set in java?
What is an class?
What is bool mean?
Can long be null in java?
Can you call a method in a method?
How a string is stored in memory?
What is mvc in java?
Does java have extension methods?
How do you read and print a string in java?
In how many ways we can create threads in java?
What is a substitution variable?
What is class forname?
What is java used for?
Explain the importance of finally block in java?