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
Is heap stored in ram?
What are examples of modifiers?
What is the difference between yielding and sleeping in java programming?
What is the byte range?
What is port number in java?
What is the exact difference in between Unicast and Multicast object?
What is classpath?
Which one of the following suits the description of a string better: derived or primitive?
How the metacharacters are different from the ordinary characters?
What is pangram in java?
Explain some best practices you would apply while using collection in java?
If goto and const is reserve words than why it is not work in java?
Can we catch more than one exception in a single catch block?
What is the properties class?
Is array size fixed in java?