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
Why a dead thread occurs?
What is the difference between math floor and math round?
What is a method declaration?
Can we override constructor in java?
What is literal example?
How do you add an element to an arraylist in java?
What is the difference between the paint() and repaint() methods?
What is the static keyword?
What are identifiers in java?
What is the use of static methods?
How do you create a bulleted list?
Are primitives objects?
How does class forname work in java?
Why runnable interface is used in java?
How many classes can any class inherit java?