top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is Singleton class in Java and where it is used?

0 votes
80 views
What is Singleton class in Java and where it is used?
posted Sep 3, 2013 by Arvind Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Singleton is a design pattern meant to give one & only one instance of an object,other objects can get a reference to this instance through a static method.It required because it give advantage in memory management and for garbage collection.Also restricting the number of instances may be necessary for technological or business reasons for example,we may only want a single instance of a pool of database connections.

answer Sep 4, 2013 by Vinay Shukla
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...