How can we make a class singleton?
Answer / Mohit Jaiswal
"By using the `enum` keyword or by making the constructor private and providing a static method to access the single instance of the class."
| Is This Answer Correct ? | 0 Yes | 0 No |
can used Protected Class outside Function.?
What is anagram of a string?
What is a boolean used for?
What is JDK? Mention the variants of JDK?
How many bits is a string?
What are library required to connect to excel sheet.
What is variable argument in java?
What is mnemonic code?
how an we achive multiple inhetitance in java using interface..??
What is the final class?
How is Garbage collection done in Java?
What is meant by data hiding in java?