Bookmark Topic Watch Topic
  • New Topic

constructor private ?  RSS feed

 
samdeep aarzoo
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Report post to moderator
can we make constructor private
is it legal to make constructor private
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Report post to moderator
Yes, this is a common practice in creating Singletons and utility classes.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!