What is singleton class?
Answer Posted / ashish srivastava
public class Singleton {
private static Singleton s = new Singleton();
private Singleton(){
}
public static Singleton getObject(){
return s;
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How we can generate random numbers in java?
What is an 8 bit word?
What is java in layman terms?
What is the difference between delete and delete[]
What is mnemonic in assembly language?
What are some alternatives to inheritance?
What is not thread safe?
What is java objectoutputstream?
How to do a true java ping from windows?
What is abstraction in java?
Differences between C and Java?
How are variables stored?
What are the major advantages of internal iteration over external iteration?
What is a 16 bit word?
What are constructors in java?