Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we create object of class with private constructor?

Answer Posted / rajneesh

Public class mainclass
{
private static mainclass _obj = null;
private constr()
{
}
public static mainclass obj
{
get
{
return _obj
}
}

}

after that you can access the obj in other class .

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is object oriented programming so hard?

1134


Which method cannot be overridden?

1171


What are the benefits of polymorphism?

1361


What are the types of abstraction?

1151


State what is encapsulation and friend function?

1341


What is the main purpose of inheritance law?

1248


What is abstract class in oops?

1074


What is data binding in oops?

1150


Who invented oop?

1193


what is the drawback of classical methods in oops?

3428


Where is pseudocode used?

1166


What is polymorphism and types?

1161


How is polymorphism achieved?

1111


What is object and class in oops?

1115


What is an example of genetic polymorphism?

1242