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 |
I need to know about complete topic in java's collections i with an examples
Which is easier netbeans or eclipse?
What are the steps that are followed when two computers connect through tcp?
When does the compiler supply a default constructor for a class?
What is the difference between a choice and a list?
What is the difference between C++ & Java?
78 Answers College School Exams Tests, HAL, SUN, Syntel, TCS, Wipro,
What is the difference between dom and sax parser in java?
How to sort array of 0 and 1 in java?
Which list does not allow duplicates in java?
What is meant by event handling in SAX parser?
What is the purpose of stub and skeleton?
Why should I use abstract class?