what is singleton class? where it mainly used in the
projects?
Answer Posted / jhuma
singleton class is such kind of class in which only one
object is created throughout the life time of the class.
class Singleton
{
public static Singletone si;
private Singletone()
{
si=new Singletone();
}
public static Singletone show()
{
return si;
}
public static void main(String ar[])
{
Singleton s1=Singletone.show();
}
}
| Is This Answer Correct ? | 44 Yes | 22 No |
Post New Answer View All Answers
What is the highest-level event class of the event-delegation model?
Where can I ask questions and make suggestions about seam?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
What is ioc concept & explain it?
What are JTA/JTS and how they used by client?
whats is mean by tiles in struts
What do you need to set-up a cluster with jboss?
Can I run seam with jdk 1.4 and earlier?
What modifiers may be used with an inner class that is a member of an outer class?
What is the difference between java class and bean?
What is a clone?
what is a non-repeatable read?
what is a portable component?
What is mdb and what is the special feature of that?
Why use a datasource when you can directly specify a connection details?