what is the use of private constructor in core java?
Answer Posted / rakesh
Private constructor can be used if we do not want any other
class to instantiate the class. This concept is generally
used in Singleton Design Pattern. The instantiation of such
classes is done from a static public method.
| Is This Answer Correct ? | 54 Yes | 3 No |
Post New Answer View All Answers
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
What is garbage collector?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What are the advantages of unicode?
What is assembly language?
What is the difference between a method and a procedure?
Can we convert list to set in java?
What are new features introduced with java 8 ?
Difference between java and javascript
Is empty list java?
if u open login & logout ,how can udisplay the timelogin & logout members ?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Why are pointers not secure?
Can singleton class be cloned?
What is the method in java?