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 are the files generated after using IDL to java compiler?
If you do not want your class to be inherited by any other class. What would you do?
Explain the init method?
What are the difference between composition and inheritance in java?
What are the three best choices for a development environment?
Differentiate jar and war files?
How do you sort arrays in java?
What does method mean?
Program to Find the second largest element in an array.
Which class is the superclass of all classes?
What are heterogeneous objects?
which pattern is default in scanner package?
List out five keywords related to exception handling ?
Can you sort a string in java?
Can private class be inherited in java?