How to prevent to create multiple objects of a java class?
Answer Posted / naseer
declare constructor as private .that class only create one object
| Is This Answer Correct ? | 10 Yes | 6 No |
Post New Answer View All Answers
When is the finalize() called?
What is a text string?
Difference between string, stringbuffer and stringbuilder?
What is a vararg?
Name container classes in java programming?
What is the difference between the final method and abstract method?
What are voids?
What is an empty list in java?
What is string made of?
How to connect to a remote database using Applet?
What are the difference between composition and inheritance in java?
Why a dead thread occurs?
how can i use a nonsynchronized hashtable?
Can a method be overloaded based on different return type but same argument type?
how can you take care of mutual exclusion using java threads? : Java thread