How many objects are created for a singleton class
Answer Posted / utkarsh verma
Some correction required in last solution
void main(){
Single *ptr = Single::Instance(); //The only way to
//instantiate
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can a class extend 2 classes in java?
Why are getters and setters used?
Why we use methods in java?
Can we change the value of static variable?
How do you sort arraylist in descending order?
Compare java and python.
What does super keyword do?
What is parseint?
Can a static method be overridden in java?
What is remote method invocation (rmi)?
What is meant by anonymous class?
What class of exceptions are generated by the java run-time system?
Can a lock be acquired on a class in java programming?
Explain wait(), notify() and notifyall() methods of object class ?
What happens to the Exception object after handling an exception?