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
What if static is removed from main method?
Does java trim remove newline?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is the use of a conditional inclusion statement in Java ?
What is object in java?
What is hashtable and explain features of hashtable?
Do you know why doesn't the java library use a randomized version of quicksort?
Why do we use threads in java?
What is string data?
Is void a keyword in java?
What is the reflection?
Define how objects are stored in java?
How do you execute a thread in java?
What is the purpose of a parameter?
What is super keyword explain with example?