kiran karthik Posted September 12, 2013 Report Posted September 12, 2013 constructors meant for intialization. so if a constructor declared as private means the class can't be instantiated from outside of that class and it is mainly useful in singletons
vijayjust4u Posted September 12, 2013 Report Posted September 12, 2013 [quote name='arunachalam' timestamp='1379009807' post='1304240288'] 2. Let me try.. private constructor is used when the class is private ? [/quote] Nee answer ki nee Display pic ki correct gaa suit ayyindhi.. LOL Just kidding....
bujjulu Posted September 13, 2013 Author Report Posted September 13, 2013 [quote name='kiran karthik' timestamp='1379010412' post='1304240354'] constructors meant for intialization. so if a constructor declared as private means the class can't be instantiated from outside of that class and it is mainly useful in singletons [/quote] good Inka emina answer cheyyagalara out of the box?
Pekatapaparao Posted September 13, 2013 Report Posted September 13, 2013 when we opt for singleton pattern we make class constructor as private.
Pekatapaparao Posted September 13, 2013 Report Posted September 13, 2013 [quote name='SinnaBabu_Chavatabbayi' timestamp='1379017128' post='1304241001'] Nee answer ki nee Display pic ki correct gaa suit ayyindhi.. LOL Just kidding.... [/quote] hahahaha aa answer to interview apestaru US or any place in the planet burra unna interviewer aithe
Recommended Posts