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
How do you initialize an arraylist in java?
What is boolean flag in java?
How to convert string to char and vice versa?
What is the internal implementation of set in java?
What is qualitative variable?
Can we override private method?
What is a function in java?
What is the association?
Is minecraft 1.15 out?
What are the loops in java?
What is constructor chaining in java?
What is functional interface in javatpoint?
What is gc()?
What is the difference between public, private, protected, and friend access?
Explain about collection interface in java?