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

What is oops concept with example?

967


Is enum a class?

1002


Please send ford technologies placement paper 2 my mail id

2057


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6621


2. Give the different notations for the class.\

2082


What is cohesion in oop?

1008


What is static in oop?

1025


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

2075


write string class as your own class in java without using any built-in function

2443


What is difference between polymorphism and inheritance?

1020


Can abstract class have normal methods?

992


Templates mean

2027


what is the drawback of classical methods in oops?

3315


What is an example of genetic polymorphism?

1116


Why is there no multiple inheritance?

952