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 create packages in java?
When is the finalize() called? What is the purpose of finalization?
What are the differences between include directive and include action?
What is jar?
What is the difference between a field variable and a local variable?
What is an object's lock and which object's have locks in java programming?
What are unchecked exceptions in java?
State the difference between creating string as new () and literal.
What is the synchronized method modifier?
How do you represent a space in regex java?
What is string pool?
What is a numeric literal?
What is default exception handling in java?
What is the difference between notify and notifyall method?
What are the different ways of implementing thread? Which one is more advantageous?