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 to sort list of list in java?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
Explain about narrowing conversion in java?
How to run a JAR file through command prompt?
Can a class extend 2 classes in java?
How many digits is int32?
What is meant by bytecode?
Is oracle java 11 free?
Can arraylist contain null values?
When can an object reference be cast to an interface reference in java programming?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
What are the 3 types of control structures?
What is the default value of the local variables?
What is tcp ip in java?
What is the basic concept of java?