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
explain what is transient variable in java?
Is there any difference between synchronized methods and synchronized statements?
How is tree Mirroring implemented?
What is the difference between hashmap and hashtable in java?
What is functional interface in java example?
Explain the difference between a Thread and a Process.
Mention the default values of all the elements of an array defined as an instance variable.
What are the actions that can occur when a thread enters blocked state?
What are sets in java?
What is the program compilation process?
define the terminology association.
Can singleton class be serialized?
What is heterogeneous in java?
What are the differences between Java 1.0 and Java 2.0?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?