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 is an object in java?
What is floating data type?
What is method in java ?
What is java string pool?
What are the drawbacks of reflection?
How can an exception be thrown manually by a programmer?
What is the function of compareto in java?
what is object slice?
What is nested loop? What is dangling else condition in it?
Explain about the security aspect of java?
Why deletion in linkedlist is fast than arraylist?
what is synchronization? : Java thread
What are the two types of streams offered by java 8?
What are class members by default?
What is t in generics in java?