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
What is primitive data type in java?
Difference between default and protected access specifiers?
Explain the protected field modifier?
How does arraylist work in java?
What do you mean by platform independence?
Explain the difference between collection api and stream api in java8?
Which collection allows duplicate values in java?
What does microservices mean?
How to provide security in java
Can we create an object of private class?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
How can a gui component handle its own events?
Can we declare a class as abstract without having any abstract method?
what happens when a thread cannot acquire a lock on an object? : Java thread
What is difference between synchronize and concurrent collection in java?