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
Is void a data type?
How can we break singleton in java?
Can you use abstract and final both with a method?
What is the use of default method in interface in java? Explain
Why do we need array in java?
How do you use compareto?
Explain about public and private access specifiers?
Write a program to print count of empty strings in java 8?
What is the buffer limit?
What do you mean by Hash Map and Hash Table?
make a method which any number and any type of argument and print sum of that arguments.....
Can we use a switch statement with strings?
What is mvc in java?
what is a working thread? : Java thread
How many decimal places is a double?