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
Name few java 8 annotations ?
what is method reference in java 8?
Explain the scope of a variable.
Is java util regex pattern thread safe?
What does next mean in java?
Does java list allow null?
When should I use stringbuffer?
What is your platform?s default character encoding and how to know this?
What is package protected in java?
what type of questions asked for barclays technologies pune please send urgent
Why java is called not pure object oriented language?
What is java util list?
How many return statement are allowed in a function?
What is an object in java?
how are methods defined?