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
Can a static method be overridden in java?
What is string immutability?
what is the purpose of using rmisecuritymanager in rmi?
Is there a sort function in java?
State the significance of public, private, protected class?
Describe string intern() methodology
What is Session reduplication and how its done?
How many decimal digits is 64 bit?
Can classes declared using the abstract keyword cab be instantiated?
Can vector have duplicates in java?
What is meant by overloading?
what are the high-level thread states? : Java thread
What is singleton math?
Is an object null?
What is finalize()? Is finalize() similar to a destructor?