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
How to implement an arraylist in java?
Explain about main thread in java?
What is meant by interface?
What is multithreading and its advantages?
How do you end a program?
What is the difference between the paint() and repaint() methods in java programming?
How do you write a conditional statement?
Why java is secure? Explain.
What is the best definition for data?
placement papaers of spring computing technology
How do you compare arrays in java?
Is java a security risk?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
What is the purpose of default constructor?
What are the two categories of data types in the java programming language?