what is singleton class? where it mainly used in the
Answers were Sorted based on User's Feedback
Answer / jhuma
singleton class is such kind of class in which only one
object is created throughout the life time of the class.
public static Singletone si;
public static Singletone show()
public static void main(String ar)
|Is This Answer Correct ?||44 Yes||22 No|
Answer / niraj
singleton means single. singleton class is that class
which have only one object , or in which class has only one
|Is This Answer Correct ?||17 Yes||3 No|
Answer / suresh jv
Singleton class is a class, it allows jvm to create only one
most of the people think that servlet is a singleton class.
but it is not a singleton class. Actually for each servlet
one object will be created by container.
But suppose if u want to create another object for same
servlet, that servlet allows us to create another object but
the container (server) will not allow to create second object.
When a huge amount of requests coming to servlet, some of
the servers (espcially weblogic)allows to create second
object for same servlet to handle huge amount of requests,
then how can u say servlet is a singleton class.
"The class, itself doesn't allow to create second object "
is called singleton class.
this helps a lot u.....
|Is This Answer Correct ?||1 Yes||1 No|
Answer / rani
An Java API using Singleton is
|Is This Answer Correct ?||8 Yes||14 No|
How are the elements of a borderlayout organized?
what is Activation Instantinator?
How many JSP scripting elements and what are they?
what is the use of Object Factories?
diff between jsp include directive and jsp action include?
How to get an image from db2 database plz help as soon as possible
Explain about local interfaces.
what are RemoteObjects?
Why use a datasource when you can directly specify a connection details?
What is abstract schema?
whats is mean by tiles in struts