Coding & Programming > Programming Forum

What is a Private Constructor?

<< < (2/2)

A private constructor is a special instance constructor. It is generally used in classes that contain static members only. If a class has one or more private constructors and no public constructors, other classes (except nested classes) cannot create instances of this class.


[0] Message Index

[*] Previous page

Go to full version