what is the use of private constructor in core java?
Answer Posted / deep chandra harbola
private constructor are used to create Sinleton class.
example logger class
for singleton class only one object can be created.
by default member of singleton class are static.
singleton class can not be inherited.
Is This Answer Correct ? | 29 Yes | 3 No |
Post New Answer View All Answers
Convert Binary tree to linked list.
What is the difference between dom and sax parser in java?
What are the major advantages of internal iteration over external iteration?
Difference between operator overloading and function overloading
What is method in research paper?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is the difference between arraylist and hashset in java?
How to split a string in java?
What are static variables and functions?
What are parameters in a method?
Describe what a thread-local variable is in java?
what is method reference in java 8?
What is method overloading in JAVA? Why is it not present in C ?
Can we catch more than one exception in a single catch block?
Are arrays immutable in java?