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
What are autoboxing and unboxing? When does it occur?
What is static import?
How static variable work in java?
How to retrieve data from database in java using arraylist?
Does java support function overloading, pointers, structures, unions or linked lists?
Is java jre still free?
when you will synchronize a piece of your code? : Java thread
How do you check whether the list is empty or not in java?
Where will it be used?
What is instance means in java?
Are floats faster than doubles?
What is annotation in java?
What do you mean by aggregation?
What does @param args mean in java?
What is the instance of an object?