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
What is casting in java programming?
What are accessor methods in java?
Is alive in java?
What is garbage collection? Can it be forced to run?
What is the role of garbage collector in java?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
What are the drawbacks of singleton class?
What is the set interface in java programming?
What is numel matlab?
What languages are pass by reference?
What is the use of pattern in java?
Does java have a compiler?
how can you take care of mutual exclusion using java threads? : Java thread
Can we have static methods in an interface?
What is the purpose of return statement?