How to prevent to create multiple objects of a java class?
Answer Posted / sadiq
Using Singleton Design pattern we can prevent class creating
multiple objects.
| Is This Answer Correct ? | 30 Yes | 3 No |
Post New Answer View All Answers
What will be the default values of all the elements of an array defined as an instance variable?
Is overriding possible in java?
Explain enumeration in java?
What is java life cycle?
What is the difference between exception and error in java?
Why we go for collections in java?
Why put method is used?
What’s a deadlock?
Is treeset sorted in java?
What is the purpose of format function?
What are the types of strings?
How do you represent a space in regex java?
What is anonymous inner class?
Write a program to print the pattern given below
Is java still relevant?