How to prevent to create multiple objects of a java class?
Answers were Sorted based on User's Feedback
Answer / sadiq
Using Singleton Design pattern we can prevent class creating
multiple objects.
| Is This Answer Correct ? | 30 Yes | 3 No |
Answer / naseer
declare constructor as private .that class only create one object
| Is This Answer Correct ? | 10 Yes | 6 No |
Explain hashset and its features?
How a string is stored in memory?
What does || mean in vectors?
Can we inherit inner class?
Difference between this() and super() ?
What are the advantages of java inner classes?
How OOPS concept is achieved in Java?
6 Answers Cognizant, JPMorgan Chase, Xavient,
How many functional interfaces does java 8 have?
Is void a return type?
What does the append?
why is S capital in System.out.println ????
What does I ++ mean?