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
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What is method in java with example?
How dead lock situation occurs in java and how you can identify it?
What is private public protected in java?
What are the types of sockets in java?
What are the differences between forwarding () method and sendredirect() methods?
What is tree node in java?
Why main function is static?
What is collection sort in java?
Which software is used for java programming?
Why is singleton not thread safe?
Does .length start 0 java?
Write a program to show whether a graph is a tree or not using adjacency matrix.
Is arraylist an object in java?
What is the difference between static and non-static variables in java programming?