How to prevent to create multiple objects of a java class?
Answers were Sorted based on User's Feedback
Answer / sadiq
Using Singleton Design pattern we can prevent class creating
multiple objects.
| Is This Answer Correct ? | 30 Yes | 3 No |
Answer / naseer
declare constructor as private .that class only create one object
| Is This Answer Correct ? | 10 Yes | 6 No |
what is the purpose of the runtime class?
What is difference between Heap and Stack Memory?
If try block is successfully executed, Then Is Finally block executed?
how to deploy tomcatserver to weblogic server? write d following steps?
What is the purpose of javac exe?
explain me with a code snippet about the generation and handling of null point exceptions.
Is it possible to make an array volatile?
How does the java compiler work?
Which methods are used during serialization and deserialization process?
How to disable caching on back button of the browser?
Why are variables important in research?
Does importing a package imports its sub-packages as well in java?