View Single Post
  #8 (permalink)  
Old 05-02-2008, 08:38 AM
sanjeevtarar's Avatar
sanjeevtarar sanjeevtarar is offline
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Quote:
Originally Posted by Zosden View Post
Why would you ever make a private constructor that just sounds stupid. Also I use abstract when I want to extend something. like lets say I have a customer generator. Then I want to have a uniform customer generator, and a bell curve customer generator. If I made the customer generator an interface there would be a lot of dupliction of code whereas if I make customer generator class abstract then uniform would have to just have decide when to create a customer and not have to worry about actually generating a customer.
There is no use of private constructor in Abstract class. There is no use of abstract class until or unless it is extended. And if one make a private constructor then there will be no use of abstract class.....

THEN WHY COMPILER PERMITS TO MAKE PRIVATE CONSTRUCTOR...IS THERE ANY SCENARIO WHERE IT IS USED IN ABSTRACT CLASS.
__________________
sanjeev,संजीव
Reply With Quote