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
What is a class object?
What do you mean by flow of struts?
What is bifunction in java?
How do you sort in descending order in java using collections sort?
What is sortedset in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is command line argument in java?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
Can we create our own daemon thread?
What are actual parameters?
What are use cases?
What is the latest java version?
Can you make a constructor final?
What's the purpose of using break in each case of switch statement?
Explain importance of finally block in java?