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
What is a dynamic array in java?
What is anti pattern in programming?
What do you understand by overloading and overriding in java?
How does a for loop work java?
What is finalize()? Is finalize() similar to a destructor?
What does function identity () do?
What is an interoperable application in java ?
What is the difference between declaration and definition in java?
What is thread safe java?
Java is Pass by Value or Pass by Reference?
What is ternary operator?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an
What is difference between public static and void?
What are autoboxing and unboxing? When does it occur?
What is skeleton and stub?