Java Software Engineer Question:
Download Questions PDF

Explain me what is singleton class and how can we make a class singleton?

Answer:

Singleton class is a class whose only one instance can be created at any given time, in one JVM. A class can be made singleton by making its constructor private.

Download Java Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what is the difference between an Iterator and a ListIterator?Explain me how are Annotations better than a Marker Interfaces?