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 meant by 'Class access modifiers'?
What are the advantages of autoboxing?
Can a class be protected in java?
Differentiate between the constructors and methods in java?
What is a stringbuilder?
Are arrays passed by reference in java?
List out five keywords related to exception handling ?
What is the flag in java?
Why null value is used in string?
What is difference between static variable and global variable?
what is singleton class in java?
What data type is string java?
What is thread life cycle?
What is constructor chaining in java?
What are loops in java?