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
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.
What is difference between object state and behavior?
What is permgen or permanent generation?
What is the form of storage space in java?
What is an abstract method?
Explain what is orm?
How to implement RMI in Java?
Why do threads block on i/o?
What is aop(assepct oriented programing)?
What is table mutation and how do you avoid it?
How messaging services are done, before release of JMS?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
How to determine SGA site?
how to use debug in my elipse to solve problems that exist in my project
cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..