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 nullpointerexception in java?
How does arrays sort work in java?
What is arraylist e in java?
What are some examples of variable costs?
What are the different types of methodologies?
What is the range of a character variable?
Give the hierarchy of inputstream and outputstream classes.
What is integer parseint?
What is number data type in java?
which pattern is default in scanner package?
Give me an example of array and linked list? Where they can be used?
What is java reflection api?
What is locale?
What are the super most classes for all the streams?
What is the role of garbage collector in java?