What is singleton class?
Answer Posted / nagarjuna
Singletonclass is a class which can be instantiated only once.
public class Singleton
{
private static single = new Singleton();
Private Singleton();
{}
}
For a singleton class, the constructor is made private and
a static variable is used for instatiating the class.
Is This Answer Correct ? | 4 Yes | 6 No |
Post New Answer View All Answers
What is difference between equal and == in java?
What is the functionability stubs and skeletons?
Can the garbage collection be forced by any means?
Why is sizeof not a function?
What are the two main uses of volatile in Java?
Is string is a class in java?
Write a program to show whether a graph is a tree or not using adjacency matrix.
How to perform quicksort in java?
How destructors are defined in java?
What are the restrictions that are applied to the java static methods?
Is it safe to install java on my computer?
What is java basic concept?
what type of questions asked for barclays technologies pune please send urgent
Is static a singleton?
What do you understand by the term wrapper classes?