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
How to use string tokenizer class.
Is hashset ordered?
What is the escape character in java?
What is a method in coding?
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
What is the collection interface?
What are the types of java?
What is arguments in java?
Explain about the interpreter in java?
How will you communicate between two applets?
Why does java does not support multiple inheritance? Explain
Why java is platform independent? Explain.
How do you sort in ascending order in java?
How will you load a specific locale?
Is there a sort function in java?