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
Does anyone still use java?
What is the use of predicate in java 8?
What do you meant by active and passive objects?
What is the indent key?
What is output buffer?
What are java packages? What is the significance of packages?
What is an example of a constant variable?
What is the main purpose of java?
How to avoid memory leak in java?
What is the list interface?
Can we create an object of private class?
How to display all the prime numbers between 1 and n (n is the number, get the input from user)
What is private static in java?
What are abstract classes and anonymous classes?
What is the difference between JVM and JRE?