What is a singleton class in Java? And How to implement a singleton class?
Answer Posted / nashiinformaticssolutions
A class that can possess only one object at a time is called a singleton class. To implement a singleton class given steps are to be followed:
1. Make sure that the class has only one object
2. Give global access to that object
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can arraylist hold different types java?
Describe the syntax of multiple inheritance? When do we use such an inheritance?
What are the different types of java?
What is meant by the value of a variable?
What is exception in java?
What is method in java with example?
List implementations of list interface?
Which is better stringbuffer or stringbuilder?
What is string buffer?
Can memory leak in java?
What is isa relationship?
How does a cookie work in Servlets?
What is Java Annotations?
Can java inner class be static?
What do you understand by soft reference?