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 a literal coding?
What is the functionality of the stub?
What is the intersection and union methods?
What are class types in java?
What do you mean by of string::valueof expression in java 8?
How do you declare an array that will hold more than 64KB of data?
What is static and final keyword in java?
What is the locale class in java programming?
What is an immutable object? How do you create one in java?
Where is the singleton class used?
Does isempty check for null?
Why can't we use static class instead of singleton?
What happens when you add a double value to a string?
How to avoid memory leak in java?
make a method which any number and any type of argument and print sum of that arguments.....